Forum Discussion

patan's avatar
patan
New Contributor III
3 years ago
Solved

I wanted to create multiple arrays from a single array based on specific Field

I have the below input: “AT_Pricehash”: [ { "@TermsListID": "Test1", "ORGID":"1000", "@MinimumQuantity": 1 }, { "@TermsListID": "Test2", "ORGID":"1001", "@Mini...
  • viktor_n's avatar
    3 years ago

    Hi @patan,

    If you have already array you can achieve this with group_by function in jsonPath.

    Like this: jsonPath($, "$array[*].group_by(value['ORGID'])")

    And here is the output:

    Regards,
    Viktor