Topic: How to use inbuilt pascal units
I am trying to use json in script, for that i am using the fpjson unit provided with fpc.
https://www.freepascal.org/docs-html/cu … index.html
But don't know how to link or use in MVD. Please advice me on this.
uses fpjson, jsonparser;
Var
D,E : TJSONData;
begin
D:=GetJSON('{ "Children" : ['+
' { "Age" : 23, '+
' "Names" : { "LastName" : "Rodriquez",'+
' "FirstName" : "Roberto" }},'+
' { "Age" : 20,'+
' "Names" : { "LastName" : "Rodriquez",'+
' "FirstName" : "Maria" }}'+
' ]}');
E:=D.FindPath('Children[1].Names.FirstName');
ShowMessage(E.AsJSON);
D.Free;
end.