Retrieving data with APOC xml


Hi all,
My problem here is, I want to query the SymbolName attribute from Metadata and the Name attribute from GraphicElements-EmbeddedSymbol. I have attached the query as well. The issue I have is, I can only run either half of the code, that is, I am only able to get the SymbolName of Metadata, or the Name of the EmbeddedSymbol. When I run both the parts, I am not able to get the output, it says NO CHANGES, NO RECORDS. Is it possible to do this, or did I make a mistake in my query?
P.S I have tried adding sname in line11 as well, but it doesn't work.
Do help out if possible,
Thanks,
Sandeep

You can also just do a main unwind and do the filtering in the return in two columns

Are you sure that AllElements is a list ?

try instead:

RETURN [x IN value._children WHERE x._type = 'Metadata' | x.SymbolName] as metadata,
[x IN value._children WHERE x._type = 'GraphicElements' | [y in x._children WHERE y._type='EmbeddedSymbol' | es.Name]] as graphicSymbols

or the same two subqueries over value._children each

if you do subqueries over individual elements, one of both will have zero rows which then kills the other.