Matrix Version: 5.3.0.0
I have a REST Resource Asset (with ID 1560461) that returns the following JSON:
{"react_root":"<div data-reactroot=\"\">This is a part of page 1 rendered using React.<\/div>"}
Inside a Standard Page asset, which is nested under another standard page, I have the following:
<div id="%nested_get_element_id%">
%globals_asset_contents_raw:1560461^json_decode^replace_keywords:index:{nested_get_element_id}%
%globals_asset_contents_raw:1560461^json_decode^replace_keywords:index:react_root%
%globals_asset_contents_raw:1560461^json_decode^index:react_root%
</div>
This gets rendered as the following:
<div id="react_root">
{"react_root":"<div data-reactroot=\"\">This is a part of page 1 rendered using React.<\/div>"}
{"react_root":"<div data-reactroot=\"\">This is a part of page 1 rendered using React.<\/div>"}
<div data-reactroot="">This is a part of page 1 rendered using React.</div>
</div>
As you can see, when indexing the JSON without using replace_keywords, it works fine, but when I introduce replace_keywords, even with a static parameter, the whole keyword modifier is ignored and the JSON does not get indexed.
Can anybody shed any light on why this is happening, and if there is a workaround?