Reading Jason nested objects

Hi,

I have a json attached,Please help me to understand how can i read the data. from nested objects.

File attached for same

i need details like “id”: 504,

{
“id”: 999722,
“state”: “complete”,
“substate”: null,
“exceptions”: ,
“name”: “Production Co.”,
“output_name”: null,
“field_definition_attributes”: {
“required”: false,
“data_type”: “Generic Text”,
“multiline”: false,
“consensus_required”: false,
“supervision_override”: null
},
“transcription”: {
“raw”: “Studio”,
“normalized”: “STUDIO”,
“source”: “machine_transcription”,
“data_deleted”: false,
“user_transcribed”: null,
“row_index”: null
},

{
“id”: 999723,
“state”: “complete”,
“substate”: null,
“exceptions”: ,
“name”: “Job Number and/or Job Name”,
“output_name”: null,
“field_definition_attributes”: {
“required”: false,
“data_type”: “Freeform Characters”,
“multiline”: false,
“consensus_required”: false,
“supervision_override”: null
},
“transcription”: {
“raw”: “Barclays_I2341”,
“normalized”: “BARCLAYS_I2341”,
“source”: “machine_transcription”,
“data_deleted”: false,
“user_transcribed”: null,
“row_index”: null
},

Regards,
Heena

1 Like

can you provide correct format json string

1 Like

@praneeth.peyyeti

504JasonFile.zip (9.1 KB)

please find the attached file

Regards,
Heena

1 Like

@heena_shaikh - pls try below -

  • add “json.net” to your project dependencies
  • create a JToken variable like jsonResponse
  • jsonresult is a variable with json output with above provided text
  • do a parse and assign like jsonResponse = JToken.Parse(jsonresult)
  • do a for each loop with jsonResponse
    in loop to get values like id, state, …
    use like item(“id”).ToString
    use like item(“state”).ToString
  • for field_definition_attributes - create another variable like jsonAttachments type as JToken
  • do a foreach for the jsonAttachments
    to get values of attachment json - inside for each loop use like item(“required”).ToString
2 Likes

JsonParsing.xaml (5.2 KB)

this jsonparsing.xaml will parse the jsonstring into Jobject and you extract value from that.

1 Like

@praneeth.peyyeti thank you so much for the efforts.

but how can i read to the part.

{
“id”: 999723,
“state”: “complete”,
“substate”: null,
“exceptions”: ,
“name”: “Job Number and/or Job Name”,
“output_name”: null,
“field_definition_attributes”: {
“required”: false,
“data_type”: “Freeform Characters”,
“multiline”: false,
“consensus_required”: false,
“supervision_override”: null
},
“transcription”: {
“raw”: “Barclays_I2341”,
“normalized”: “BARCLAYS_I2341”,
“source”: “machine_transcription”,
“data_deleted”: false,
“user_transcribed”: null,
“row_index”: null
},

regards,
Heena

1 Like

what data you required from the jsonresponse.

1 Like

@praneeth.peyyeti

This is how i need the data for every Id’s availablable in file
“id”: 504
“name”: "Production Co = “normalized”: “STUDIO”,
“name”: "Production Co = “normalized”: “BARCLAYS_I2341”
“name”: “union type” = “normalized”: “NON-UNION”,
“name”: “Last Name” = “normalized”: “ROBINSON”,
“name”: “First Name and MI”, = “normalized”: “LARRY”,

The above mentioned fields are required by me,If you check the data in file you find these details.

I want these details for all id present in the json

Regards,
Heena

1 Like

JsonParsing.xaml (12.3 KB)

the above i have added name,normalized as a datatable for all pages.

Let me know if you have any queries on that.

Thanks

1 Like

@praneeth.peyyeti Thank you so much for your help.

I was struggling with json from a very long time,Now i have the solution.

Once again thank you for all the efforts.

Regards,
Heena

1 Like

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