Store Dynamic Menu data into a json from MySQL Database using PHP

EDITED I have a self referencing table storing dynamic menu data like following. |—-|—————-|———————|————| |id | name | link | parent_id | |—-|—————-|———————|————| |1 | Setup | NULL | 0 | |—-|—————-|———————|————| |2 | Common_Setup | NULL | 1 | |—-|—————-|———————|————| |3 | Management | NULL | 0 | |—-|—————-|———————|————| |4 | Gender | setup/gender…

Can run online https://www.w3schools.com/js/tryit.asp?filename=tryjson_jsonp_php but cannot run on my computer

The example at : https://www.w3schools.com/js/tryit.asp?filename=tryjson_jsonp_php But when I copy it to my computer, It did not work The error is: Uncaught SyntaxError: Unexpected token < I vitsit this site: https://idiallo.com/javascript/uncaught-syntaxerror-unexpected-token#n. They advice to use ajax but I still want to use create “script” tag (document.createElement(“script”))because JSONP allow to use First file: json_demo_db.php, second file:Call_JSON.php https://drive.google.com/file/d/1O1IeNWi45VchP2LxZ8RLlXCdKbO9DaGe/view?usp=sharing…

Angular: pass JSON data to child component

I have a paragraph and app component, and a JSON file: app component: //app.component.ts import { Component, OnInit } from ‘@angular/core’; import * as data from ‘JsonDataSample1.json’ @Component({ selector: ‘app-root’, template: `<app-paragraph [value]=’json.caseFileID’></app-paragraph>`, }) export class AppComponent{ json = data title = ‘af-bifurcated’; } paragraph component: //paragraph.component.ts import { Component, Input } from ‘@angular/core’; @Component({…