AnsweredAssumed Answered

Parsing JSON with array in root?

Question asked by wimmmmm on Oct 31, 2018
Latest reply on Nov 1, 2018 by user19752

Hi,

 

I'm trying to parse this heap of JSON - that has an array as root.

According to the manual, I should get there via e.g. JSONGetElements ( $JSON ; ".0" )

 

Alas, all I get is errors when trying to access the first element in the array...

Screenshot 2018-10-31 18.41.39.png

The $OrderJSON is starting like this:

[

{

"id": 1388,

"internal_info": " - Rain cover + Rear Carrier Black + Maxicosi Carrier + Poncho - Slot Abus Ketting Pro Tectic Insteek 4960 6KS/130",

"user_type_id": 1,

"start_date_contract": null,

"lease_period_month": 36,

"extras_ordered": null,

"license_plate": null,

"lease_price_all_in_incl_VAT": "199.12",

"gross_employee_contribution": null,

"contribution_type_id": null,

"internal_info_pricing": null,

"discount": null,

"fixed_price_discount": null,

"financing_type_id": null,

"yearly_voucher": null,

"current_voucher_value": null,

"created_at": "2018-09-13 13:12:13",

"updated_at": "2018-09-13 13:12:13",

"deleted_at": null,

"user_id": 366,

"bike_model_id": null,

"bike_id": 327,

"is_group_purchase": null,

"user": {

"id": 366,

"name": "Some person",

"email": "someemail@hotmail.com",

"created_at": "2018-09-13 13:12:13",

"updated_at": "2018-09-13 13:12:13",

"company_id": 66,

"... and so on" : "cut here for brevity"

}

},

{

"...more stuff here": "etc"

}

]

 

Did I stumble over a bug? Or is there a solution?

Outcomes