Mongo DB not returning the API Back

I have been trying to solve a query but there are some problems in it.

I have been using a database tool MongoDB and now am having troubles sending API via the selects fields limiting query.

Here’s the code,

 // 4) Field Limiting
    if (req.query.fields) {
      const fields = req.query.fields.split(',').join(' ');
      query = query.select(fields);
    } else {
      query = query.select('-_v');
    }

    const tours = await query;

    //Response
    res.status(200).json({
      status: 'success',
      result: tours.length,
      data: {
        tours
      }
    });
  } catch (err) {
    res.status(404).json({
      status: 'failed',
      message: err
    });
  }
};

it is showing something like this,

so it’s sending the API back,

someone please help…

I have been using VS Code as a code editor and Postman software for testing APIs