Re: Stripping a JSON of extra characters in PHP
Arno Welzel <[email protected]> Tue, 7 Feb 2023 09:16:52 +0100
| Newsgroups | comp.lang.php |
|---|---|
| Message-ID | <[email protected]> |
The Doctor, 2023-02-07 02:28:
[...]
> cart is subarray with the main array, added items in the cart
> is a subarray of the cart.>
> Source
>
> https://developer.moneris.com/livedemo/checkout/preload_req/guide/dotnet
No! Cart is an OBJECT there:
"cart":{
...
}
Also contact details:
"contact_details":{
...
}
The "{" indicates the beginning of an OBJECT while "[" starts an ARRAY.
As I said: learn how to read JSON and try to understand how that format
works!
Also see: <https://www.json.org/json-en.html>
--
Arno Welzel
https://arnowelzel.de