Loop through array in KQL

%3CLINGO-SUB%20id%3D%22lingo-sub-1811337%22%20slang%3D%22en-US%22%3ELoop%20through%20array%20in%20KQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1811337%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I've%20been%20exploring%20parsing%20and%20noticed%20that%20when%20parsing%20xml%20you%20get%20dictionaries%20and%20arrays.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can't%20pass%20those%20in%20functions%2C%20but%20you%20can%20pass%20a%20var%20of%20type%20dynamic%2C%20but%20then%20to%20loop%20you%20have%20to%20make%20a%20table%20and%20join%20the%20table%20with%20the%20query%20that%20you%20ran.%20Does%20anybody%20have%20any%20idea%20of%20how%20to%20loop%20through%20an%20array%2C%20I%20couldn't%20find%20anything%20around%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1812549%22%20slang%3D%22en-US%22%3ERe%3A%20Loop%20through%20array%20in%20KQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1812549%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F833862%22%20target%3D%22_blank%22%3E%40LodewykV%3C%2FA%3E%26nbsp%3BThere%20certainly%20doesn't%20appear%20to%20be%20any%20sort%20of%20looping%20mechanism.%26nbsp%3B%20Is%20there%20any%20particular%20reason%20you%20do%20not%20want%20to%20convert%20your%20array%20into%20a%20table%20to%20use%20with%20a%20join%20command%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi, I've been exploring parsing and noticed that when parsing xml you get dictionaries and arrays.

 

You can't pass those in functions, but you can pass a var of type dynamic, but then to loop you have to make a table and join the table with the query that you ran. Does anybody have any idea of how to loop through an array, I couldn't find anything around this?

1 Reply

@LodewykV There certainly doesn't appear to be any sort of looping mechanism.  Is there any particular reason you do not want to convert your array into a table to use with a join command?