Search code examples
jsonjson.netgetjsonjsonpath

Reading (Get) JSON multiple objects/arrays


I'm having an issue working http sources. I want to get data from Mailchimp using Get methods and store it in a database. The connections are made and working fine, the only thing that doesn't work is they way I setup my properties or path for the JSON.

I have two JSON data structures. I could manage to let it work for one of the two structures.

The not working working one:

{
   "members":[
      {
         "id":"xxxx",
         "email_address":"[email protected]",
         "unique_email_id":"xxxxx",
         "email_type":"html",
         "status":"subscribed",
         "merge_fields":{
            "FNAME":"HEELP",
            "LNAME":"MEEE"
         }
      }
   ]
  ,"list_id": "c4e65b1XXX"
}

I get response from the Get method, the result is one column with the name 'members' containing all the data concatenated in one string.

Below you see my JSON format and properties

"format": {
        "type": "JsonFormat",
        "filePattern": "setOfObjects",
        "jsonNodeReference": "$.members",
        "jsonPathDefinition": {
          "list_id": "$.list_id",
          "id": "id",
          "email_address": "email_address"
    }

Any assistance, guidance, help is very appreciated.

Thanks in advance and kind regards,


Solution

  • The problem is fixed. The problem was regarding an old version of the service I was using. The jsonPathDefinition is working after updating to the most recent version of the service.

    Now it is iterating and cross applying perfectly.