0

I'm getting this error on an existing collection when I tried to aggregate to join two collections

show dbs

Bankerise 172 kB admin 102 kB config 73.7 kB local 73.7 kB

use Bankerise

switched to db Bankerise

show collections

usedData UserApp


db.usedData.aggregate( [    { 
     $lookup : {
                 from: UserApp,
                localField:"id",
                   foreignField: "id", as:"same_id"       
                }   
     }])

ReferenceError: UserApp is not defined

And I thing it raises from the fact that I have imported the data Manually using GUI.

I'm missing something here ?

1 Answers1

0

As Mr prasad_ wrote in comments it is a syntax error it was missing " " on UserApp