Add Nested Field Array Value based on Array String

That looks nearly right. Use item['value] to access the value within your loop. And wrap your code in double quotes if you use single quotes in the code.