Note that there are some explanatory texts on larger screens.

plurals
  1. POget specific data using php in nested array in json
    primarykey
    data
    text
    <p>So they have this JSON and i need specific items to get e.g. promotions:</p> <pre><code>{ "currency": "USD", "code": 200, "sales_list": [ { "date": "2012-05-21", "country": "JP", units:{ app: { downloads: 10, updates: 1, }, iap: { sales: 3, refunds: 5, promotions:1 }, }, revenue: { app: { downloads “100.98”, refunds: “-10.00”, promotions: “1.00” }, iap: { sales: “30.00”, refunds: “-1.00”, }, ad: "1000.00" }, }], “iap_sales”:[ { "date": "2012-05-21", "country": "JP", “iap”: “com.iap1”, units:{ sales: 3, refunds: 5, }, revenue: { sales: "30.09", refunds: "1.21", }, }], "page_index": 1, } </code></pre> <p>How do i get the to the promotions?</p> <p>I tried to use this:</p> <pre><code> $json_data = connect(t_url); $data = json_decode($json_data); return $data-&gt;sales_list[0]-&gt;units[0]-&gt;app[0]-&gt;promotions; </code></pre> <p>but is it even effective/ efficient?</p> <p>Also im having a hard time getting data from appannie. i always get authorization problem or bad request. If bad request it means im in though right?</p> <p>I use the terminal to test curl and my url like:</p> <pre><code>curl --basic --user email : password "http:/www.appannie.com/v1/accounts/acntnum/..." </code></pre> <p>they suggested this since they have authentication. There are time i get bad request but i think im in unlike <code>unauthorized access</code> error.</p> <p>They also suggest other forms like the authethication should be basic+base 64 of ur eadd and password. But I don't know where to use it. </p> <p>Any suggestions to convert this into php curl request?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload