Help With Manipulating Text Variable inside automation

Hello,

I must be missing some stupid syntax and I cant figure out what. Any help is really appreciated.

I`m doing Google AI response to a picture, and it returns a variable with things like ““text”:” inside the output. I want to manipulated right in the automaton with a template, but I cant figure out how to use a variable inside the template. Basically something really simple like:

{{{{DCImage}}) | replace(“text”, “”) }} (DCImage being the variable)

There is couple of things wrong with the response that need to be fixed. like the {
“text”:

Here is a sample response:

{
“text”: “The image shows a house’s front porch on a snowy day. There’s a brick walkway, steps, a cushioned outdoor chair, some plants, and a shovel leaning against the house. A car is visible parked down the street.”
}

Please follow Questions Guideline #11 and properly format code and configuration blocks.

Don’t nest templates, just use the variable directly.

{{ DCImage | replace('text', '') }}

However, since the value of DCImage appears to be a json string, a better option would be:

{{ (DCImage|from_json).text }}

Sorry, I messed up on the code for the post. Thank you for the right direction, trying this now.