How to query on 2 keys properly?

Good day!

I am trying to display the activity of a specific user.

I know this code is wrong, It’s for demo purposes.

      const queryForActivity = new Moralis.Query("NFTTransfer");
      queryForActivity.equalTo("from", user.get("ethAddress"))
      queryForActivity.equalTo("to", user.get("ethAddress"))

I need to know if the user exist in both keys.

there should be a way to make an OR from two queries, you can find more info in Parse server documentation

1 Like

Found it, thanks! https://docs.parseplatform.org/js/guide/#compound-queries

1 Like