Yes I am new to JSON.
Im setting up a paymentsolution for a web shop. The customer press a button indicating he wants to receive a link via mail or SMS and make the payment at a later date.
Parameters is sent to the Payment Service Provider using HTTP(s) POST to https://{psp-url}/admin/link_pay that returns the link in a JSON response.
That response is (depending on browser) displayed as plain text whereas I of course want to grab the response and parse it - and hense send a mail/SMS to the customer.
It looks as simple as this:
{"url": "https://{psp-url}/pay/link/54abc4ab4abcd56de3fghijk", "id": "54abc4ab4abcd56de3fghijk", "result": "Success"}
My question is NOT how to parse. But - HOW do I do to get it into a variable - the only portion i really need is the "id".
The documentation from my PSP is poor (non existing) and I would really need a code example - but havent found one despite 36 hours of searching