Additional Velocity Variables and Calculations

We are working to set up the Generic ITSM connector into Jira project.
I am trying to find a way to calculate the due date for a request and trying to find a way to be able to extract a specific item value based on the name of the item.
I tried to use $request.items[“itemname”] as this is the notation shown in the Velocity User Guide but as I need to set it as RAW JSON Sailpoint IDN wont accept it as valid JSON as this statement is within another " " text field.
Any hints on if this would even be possible?

I won’t be able to tell if you if the idea works (returning itemname), but you’d need to escape the quotes, so it would look like $request.items["itemname"]

Thanks Marten.
I tried a few escape characters like $plan.request.items[#[[“displayName”#]]] and $plan.request.items["displayName"] but I keep getting a Lexical Error
I am starting to think the issue may be more with how the JSON is parsed or what SailPoint will support in the fields than the escape characters.

Managed to figure out how to extract it.
Had to run the request items through a loop and check if the request.item == ‘displayName’ then set it to a variable.

Ah! I just noticed that my escape characters were, well, escaped after I made the post.

In general using \ should work if the only issue is having to escape the character.
e.g $request.items[\"itemname\"]

But good to hear you managed to figure it out.