const {PlacesClient} = require('@googlemaps/places').v1;
let response = await placesClient.searchText(textQuery: 'something', {
otherArgs: {
headers: {
'x-Goog-FieldMask': 'places.displayName',
},}});
console.log(response);
/*
response:
[
{
places: [
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object]
],
contextualContents: []
},
null,
null
]
I would expect something like:
[
{
places: [
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object]
],
contextualContents: [],
nextPageToken: ''
},
null,
null
]
*/
Steps to reproduce