Can't create json for $.1 ($.integer)
shalithaRukshan opened this issue · 1 comments
shalithaRukshan commented
code:
$jsonObject = new JsonObject();
dd($jsonObject->getJson());
error : InvalidJsonPathExceptionError in JSONPath near '.1'
Galbar commented
Hi!
The following should work:
$jsonObject->set('$[1]','asdf');
or
$jsonObject->set('$["1"]','asdf');