-1

scraped the page from the website and store data as JSON file and checked valid JSON data from the website, I want to get data from that file on laravel, below as piece of JSON data, can anyone help to solve this issue.

[{
    "data": {
        "entityUrn": "urn:li:collectionResponse:5uIVHMD1bTeNoD/BP3JgR7QsIAu/CVRllprBLkKJgR8=",
        "paging": {
            "start": 0,
            "count": 10,
            "links": [],
            "$recipeTypes": ["com.linkedin.voyager.dash.deco.common.FullPaging"]
        }
    }
}]

1 Answers1

1

you can use file_get_contents to load your JSON content from a file into a variable.

$content = file_get_contents('test.json');
$arrContent = json_decode($content, true);
Karthik Sekar
  • 625
  • 4
  • 7