x-ray: [ {} ] does not work
{
addresses: [
{
address: '.address',
location: '.location'
}
]
}
Returns:
{ addresses: [] }
Expected:
{
addresses: [
{
address: 'address',
location: 'location'
}
]
}
About this issue
- Original URL
- State: open
- Created 9 years ago
- Comments: 30 (8 by maintainers)
this is my html
``
and i want this array
what can i do?
Here’s what I’m trying to do:
returns the following:
note the lack of a
domain
attribute on the nested objects.If I swap the arguments for the
domain
lookup tothere is no result logged to the console. It does seem to do something, but nothing is returned to the callback function.
@matthewmueller yes that works! I guess I hadn’t tried that specific combination of nesting the
x()
call.However I’m trying to do something along the following lines, and xray seems to just die on me:
So the first page read in by xray contains a list of links, and I’d like xray to follow each link to grab the
.domain
element on the resulting page.Should this work?
When I run the above, I see no console output at all but if I remove the
domain:
key, the correct array of objects withname
attributes is returned.