I have a script that pulls data from an external API. The output example is below.
[{"id": "579144bbfbd8f54f53f5394b", "username": "test1", "type": "1", "email": "[email protected]", "status": on},{"id": "afadfatqwertqr", "username": "test2", "type": "1", "email": "[email protected]", "status": on}]
I am trying to pull the id solely from the string to set it as a variable. It has to be username specific as well but any support would be greatly appreciated. Been racking my head, thanks in advance!
json_decode. use the proper tool, not regexjson_decode