Hey yahoo000,
The result returned from the translate API is valid JSON. Just because it's a 3-4 level deep of arrays it doesn't mean it's not valid JSON.
Now, the problem is that being only arrays, you don't really have a sense of what the data is, but for what you ask, it doesn't really matter.
You want the 2 strings that are translated into Polish.
Ok, let's then follow the multiple layers of the arrays:
uses
..., fpjson, ...
const
cjResponse = '[[["jak się masz\r\n","how are you\r\n",null,null,10,null,null,null,[[null,true]]],["jak masz na imię","what is your name",null,null,1]],null,"en",null,null,null,null,[]]';
var
InputJSON: TJSONData;
strTranslation0, strTranslation1: String;
begin
InputJSON:= GetJSON(cjResponse);
strTranslation0:= InputJSON.FindPath('[0][0][0]').AsString; // this should get >jak się masz\r\n<
strTranslation1:= InputJSON.FindPath('[0][1][0]').AsString; // this should get >jak masz na imię<
InputJSON.Free;
end;
I would try and have a look at what @GhostlyMan mentions about having a different output from the API.
Maybe having objects in those arrays with descriptive members would be better to grok.
Hope this helps.
Cheers,
Gus