Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229679

Using where filter with an object in ionic and loopback

$
0
0

My database is something like this

“status”: “todo”,
“author”: {
“username”: “henro92”,
“email”: "henry.unah@rocketmail.com",
“id”: “5a8aeb6b687d1b041471e4cc”
},
“source”: {
“username”: “h82”,
“email”: "henry.unah@gmail.com",
“id”: “5a71cb7637b4492704006e47”,
“firstname”: “Henry”,
“lastname”: “Jordan”,
“sex”: " Male ",
“dateOfBirth”: “2018-01-31”
}

I want to get find the data by the source which is an object like this and it doesn’t work

this.questionnaireresponseapi.findOne({where: {source: this.loopbackauth.getCurrentUserData().user }})

when I try with the status which is a string it works

this.questionnaireresponseapi.findOne({where: {source: this.loopbackauth.getCurrentUserData().user }})

Any idea on how I can solve this problem

Thank you


Viewing all articles
Browse latest Browse all 229679

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>