0

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.

2 Answers 2

0

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'];
}

print_r($itemData);
2
  • Thanks for replaying @amitkumar. I got result myself. Commented Oct 11, 2017 at 7:02
  • kindly upvote me, if my answer is helpfull. Commented Oct 11, 2017 at 7:12
1

This is my result,

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

Finally i will get all order details. Thanks you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.