JSONata retrieve child objects

Hi all, please help. I am new in jsonata. How can I modify this:

{
    "store": {
         "abc1":   {
                "category": "reference",
                "author": "Nigel Rees",
                "title": "Sayings of the Century",
                "price": 8.95
            },
           "dfc2" : {
                "category": "fiction",
                "author": "Evelyn Waugh",
                "title": "Sword of Honour",
                "price": 12.99
            }
    },
    "store3": {
        "abc3":   {
              "category": "reference",
              "author": "Nigel Rees",
              "title": "Sayings of the Century",
              "price": 8.95
          },
          "dfc4" : {
              "category": "fiction",
              "author": "Evelyn Waugh",
              "title": "Sword of Honour",
              "price": 12.99
          }
  }
}

to have something like that

  "abc1":   {
                "category": "reference",
                "author": "Nigel Rees",
                "title": "Sayings of the Century",
                "price": 8.95
            },
           "dfc2" : {
                "category": "fiction",
                "author": "Evelyn Waugh",
                "title": "Sword of Honour",
                "price": 12.99
            },
           "abc3":   {
              "category": "reference",
              "author": "Nigel Rees",
              "title": "Sayings of the Century",
              "price": 8.95
          },
          "dfc4" : {
              "category": "fiction",
              "author": "Evelyn Waugh",
              "title": "Sword of Honour",
              "price": 12.99
          }

Thanks in advance

try

$merge($$.payload.*)
1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.