cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Json data

SOLVED

Accessing Json data

How do I access Json data without using field names I have tried

 

echo '<BR><BR>' .$json_response[0][1];

var_dump

array(2) { [0]=> array(12) { ["ITEMCODE"]=> string(14) "01 GASKET-10SL" ["PROPERTYNAME"]=> string(13) "Mounting Type" ["PROPERTYVALUE"]=> string(3) "Box" ["COPYPROPERTYTOSALES"]=> int(0) ["COPYPROPERTYTOJOBS"]=> int(0) ["COPYPROPERTYTOASSEMBLIES"]=> int(0) ["COPYPROPERTYTOPURCHASEORDERS"]=> int(0) ["SYSDATECREATED"]=> string(21) "7/04/2016 11:11:03 AM" ["SYSDATEMODIFIED"]=> string(21) "7/04/2016 11:11:03 AM" ["SYSUNIQUEID"]=> int(196044019) ["SYSUSERCREATED"]=> string(6) "KEVINM" ["SYSUSERMODIFIED"]=> string(0) "" } [1]=> array(12) { ["ITEMCODE"]=> string(14) "01 GASKET-10SL" ["PROPERTYNAME"]=> string(12) "Product Type" ["PROPERTYVALUE"]=> string(6) "Gasket" ["COPYPROPERTYTOSALES"]=> int(0) ["COPYPROPERTYTOJOBS"]=> int(0) ["COPYPROPERTYTOASSEMBLIES"]=> int(0) ["COPYPROPERTYTOPURCHASEORDERS"]=> int(0) ["SYSDATECREATED"]=> string(21) "7/04/2016 11:11:30 AM" ["SYSDATEMODIFIED"]=> string(21) "7/04/2016 11:11:30 AM" ["SYSUNIQUEID"]=> int(196045090) ["SYSUSERCREATED"]=> string(6) "KEVINM" ["SYSUSERMODIFIED"]=> string(0) "" } }

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Accessing Json data

Hello @kevin_marshall2 

 

Please refer the below solution:

https://stackoverflow.com/questions/39242402/unable-to-get-jsonencode-in-magento2

 

Alternate solution at https://magento.stackexchange.com/questions/174975/magento2-how-to-convert-json-to-array-of-nested-o...

 

Hope one of the above solutions is any help to you.

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"

View solution in original post

1 REPLY 1

Re: Accessing Json data

Hello @kevin_marshall2 

 

Please refer the below solution:

https://stackoverflow.com/questions/39242402/unable-to-get-jsonencode-in-magento2

 

Alternate solution at https://magento.stackexchange.com/questions/174975/magento2-how-to-convert-json-to-array-of-nested-o...

 

Hope one of the above solutions is any help to you.

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"