How to filter the SpaceX API (mongoDB find() based) by a nested array?! Tech Test
I'm stuck on a tech test where I need to call the spaceX API and filter all launches in the response based on an array of payloads including a specific nationality string. The the response normally has only a list of payload ids, but the full payload data is populated via options object.
Link to API docs:
https://github.com/r-spacex/SpaceX-API/blob/master/docs/queries.md
I've been going through all the mongoDB docs trying to get my head around the syntax, but keep either getting all data unfiltered, or none, or an error. Been trying for days, and the I know from the recruiter that others have failed because they failed to add in this specific filter in past tech tests. I'm currently getting this error:
This is the body I am sending:
Would really appreciate any suggestions.
Link to API docs:
https://github.com/r-spacex/SpaceX-API/blob/master/docs/queries.md
I've been going through all the mongoDB docs trying to get my head around the syntax, but keep either getting all data unfiltered, or none, or an error. Been trying for days, and the I know from the recruiter that others have failed because they failed to add in this specific filter in past tech tests. I'm currently getting this error:
This is the body I am sending:
Would really appreciate any suggestions.
GitHub
:rocket: Open Source REST API for SpaceX launch, rocket, core, capsule, starlink, launchpad, and landing pad data. - SpaceX-API/queries.md at master · r-spacex/SpaceX-API
