Hi @Dworsnop, Not sure if this helps you, but I had fun playing around with mvfind, mvindex and spath. Conclusion: You can not use a field value as an "index input" for spath. So, this does not work: | eval n=1
| spath output=somefield path=yourarray{n} But, you can dump the whole array to a mvfield with spath and then get the desired value with mvindex, where you can use a field value for the index indicator. To test it, I indexed a json with a drinks array and combined it with some meals. (The AI picked the wrong drink for my burger, so I corrected it 🙂 ) source="json_drinks"
| eval meals="pasta burger pizza"
| makemv meals
| eval n=mvfind(meals,"burger")
| eval 'meal_selection'=mvindex(meals, n)
| spath output=drinks path=drinks{}
| eval 'drink_selection'=mvindex(drinks, n)
| eval noiwantbeer=n-1
| eval 'drink_selection_correction'=mvindex(drinks, noiwantbeer)
| table 'meal_selection', 'drink_selection', 'drink_selection_correction' For completness, the drinks array I used: {
"drinks": [
"beer",
"coke",
"water"
]
} BR Ralph
... View more