Getting Dynamic Data for nodeDataArray and LinkDataArray

Hi,

Are there any examples or implementation with non-hardcoded nodeDataArray and LinkDataArray ?

for Examples instead of getting

nodeDataArray: [
	    	              { key: "Record1",
	    	                fields: [
	    	                  { name: "field1", info: "", color: "#F7B84B", figure: "Ellipse" },
	    	                  { name: "field2", info: "the second one", color: "#F25022", figure: "Ellipse" },
	    	                  { name: "fieldThree", info: "3rd", color: "#00BCF2" }
	    	                ],
	    	                loc: "0 0" },
	    	              { key: "Record2",
	    	                fields: [
	    	                  { name: "fieldA", info: "",       color: "#FFB900", figure: "Diamond" },
	    	                  { name: "fieldB", info: "",       color: "#F25022", figure: "Rectangle" },
	    	                  { name: "fieldC", info: "",       color: "#7FBA00", figure: "Diamond" },
	    	                  { name: "fieldD", info: "fourth", color: "#00BCF2",  figure: "Rectangle" }
	    	                ],
	    	                loc: "250 0" }

and

linkDataArray: [
	    	              { from: "Record1", fromPort: "field1", to: "Record2", toPort: "fieldA" },
	    	              { from: "Record1", fromPort: "field2", to: "Record2", toPort: "fieldD" },
	    	              { from: "Record1", fromPort: "fieldThree", to: "Record2", toPort: "fieldB" },
	    	              { from: "Record1", fromPort: "field1", to: "Record2", toPort: "fieldC" }
	    	            ]

Cant we get these from a JSON and use this in our diagram ?

Yes and several samples do. For example:

http://gojs.net/latest/samples/stateChart.html
http://gojs.net/latest/samples/flowchart.html
http://gojs.net/latest/samples/orgChartEditor.html

All load JSON data from a <textarea> on the page instead of using hard-coded models in the JavaScript.

Also, consider this variation of the Minimal sample: http://gojs.net/latest/samples/minimalJSON.html