This question has been answered by cristianb88. See the first response.
[[!migxLoopCollection? &classname=`modTemplateVarResource` &where=`{"tmplvarid":"19","1":[ {"value":"[[*id]]"}, {"OR:value:LIKE":"%||[[*id]]||%"}, {"OR:value:LIKE":"[[*id]]||%"}, {"OR:value:LIKE":"%||[[*id]]"} ]}` &tpl=`@CODE:[[+contentid]]` &outputSeparator=`,` &toPlaceholder=`resource_ids` ]]
[[!pdoResources? &parents=`0` &includeTVs=`1` &prepareTVs=`1` &showHidden=`1` &where=`{"parent":"[[++news_id]]","id:IN":[ [[!+resource_ids]] ]}` &tpl=`el-items-news-homepage` &depth=`10` ]]