Inline script to update a list items based on a condition

I need an inline script to iterate over the array of countries and check if the country_name matches ex: US. Then update the field of that obj.

Hey,

can you please provide more and better information, instead of just stating a very blurry requirement. Explain, what you already tried, where you failed (including index creation, sample documents, query execution, everything that is needed to reproduce), which problems you ran into, why you think that you need an inline script to iterate of countries instead of just executing a search. Maybe you could use the update by query functionality - but with this sentence you make it impossible for others to chime in and help.

Please take your time and come up with a fully written problem, your tries and the issues with those. Just asking for a solution for your exactly tailored problem without specifying first is a reason to ignore suchs posts for many readers.

--Alex

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.