I have a list of a complex datatype that looks something like this:

<application>

     - key = "abcdef"

     - name = "some name"

     <version>

         - environment = "dev"

         - key = "xyz"

     <version>

         - environment = "test"

         - key = "xyz"

<application>

     - key = "ertertee"

     - name = "some name"

     <version>

         - environment = "dev"

         - key = "erew"

     <version>

         - environment = "test"

         - key = "erter"


So in this list of application each application has a list with "versions".

Is it possible to select every <version>  element that contains "dev" from this list without having to iterate over the list? I would like to use something like ListFilter but that doesnt seem to allow a filter on every <version> in the list, only for the <version>  list under 1 <application>.


I would like to end up with a list that looks like this:

     <version>

         - environment = "dev"

         - key = "xyz"

     <version>

         - environment = "dev"

         - key = "erew"


Hope this question makes sense.


Hi 

It appears you have a list of applications having a list of version for each application

App1

    ver1

    ver2

App2

    ver1

    ver2

    ver3

App3

   ver4

You would have to iterate over the application list and apply listfilter on the list of versions. 

A pseudo flow could be 

1 ) Foreach (item in Applications) 

     1.a)  Fetch the list of versions for each application item

     1.b)  ListFilter versions based on the condition you need to filter 

     1.c) Append the filtered version to a new list (having only versions of interest) 


      Hope this helps !!!