grafana logql query using line_format and regexReplaceAll dynamically

I need to read my logs just like they were displayed in the application console.

My grafana LogQL query looks like this :

{job="myjob", host="myserver"} 
| json 
| line_format `{{ regexReplaceAll "{(.*?)}" .MessageTemplate "{{.Properties_${1}}}" }}`

It ouputs a json object, I would like to use the “MessageTemplate” property and replace all the bracketed variables back where they belong so the log is readable in grafana log dashboards.

My problem is when using regexReplaceAll("<regexp>" <String_To_search> <output>) you cannot parse the output as a variable. Is there a way to do this that I missed ? I’ve tried hundreds of combinations and parsed through the official documentation.

Please let me know if it’s impossible !