How to set item[props.x].state from actionVariableValue?

There is no reason to do this if the variable and the item state are truly the same.

Both variables and items store information. The only point behind variables is that they store information in a more restricted scope (within just a widget or page) than items (within all of OH). But there is no place in a widget expression that you can use the value of a variable where you cannot just use the state of an item instead. So, if you are going to set an item state to a value then just use that item state everywhere you would otherwise use it as a variable.

In your case there is only one extra wrinkle. You appear to want this value to be an object which is easy when you’re using a variable, but there is no such thing as an object item. In the widgets, item state are always returned as strings anyway, even if there were. In this case you just have to parse the item string into a object when you need the value of one of it’s keys which is why the JSON object is available to you in the widget expressions:

JSON.parse(item[your_item_name].state).your_key

This seems like a little extra typing and complexity in the expression, but it’s better than the alternative in this case. You cannot have one oh component perform more than one action so to set both a variable and an item you would have to use this work around:

But that is far more complicated than an extra parse method in a few expressions.