I got sales order details from Rest API.

enter image description here

How to fetch this values(like When i call base_currency_code it will show USD). Thank you.


As an APi response is converted into array, You can fetch 'base_currency_code' by writing a loop as below.

$itemData = arrya();

foreach($apiItems as $item)
  $itemId = $item['item_id'];
  $itemData[itemId]['base_currency_code'] = $item['base_currency_code'];

| improve this answer | |
  • Thanks for replaying @amitkumar. I got result myself. – Rajesh Nagappan Oct 11 '17 at 7:02
  • kindly upvote me, if my answer is helpfull. – Amitkumar solanki Oct 11 '17 at 7:12

This is my result,

foreach ($result['items'] as $item){
echo '<br>';

Finally i will get all order details. Thanks you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.