thanks for your response.
I understand that I must further develop my questions but I am holding back my English
explication :
i use ajax for load a resource, with a jquery class, i want load, in a json array, all the child of parent resource.
for that, my snippet recover the html in all resources with this
$url = $modx->makeUrl($IdApres, '', '', 'full');
if($http= fopen($url,"r")){
while(!feof($http)){
$data .=fgets($http,1024);
}
fclose($http);
}
preg_match_all('/(<!--DebutContenuArtiste-->)(\W.*)(<!--FinContenuArtiste-->)/imsU',$data,$result);
foreach($result[2] as $ContentRessource){
$ContentRessource;
}
create a json array
[
{"idressource1":[
{
"contentHTML":" here, the code html of my ressource1"
}
]},
{"idressource2":[
{
"contentHTML":" here, the code html of my ressource 2"
}
]},
{"idressource3":[
{
"contentHTML":" here, the code html of my ressource 3"
}
]}
]
and in my class jquery. I’ll look in the table json the content that I want to display