help please, I am writing a telegram bot for feedback, at the moment it works in a private chat (i.e. the user writes to the bot – I answer reply the bot via reply and the user receives SMS from the bot), but does not work in the group chat( in a group I can see the user’s messages, but
Tag: nodes
fetch specifi data from json and store them in array using node js / Javascript
I am trying to fetch all the log details from this json object but the problem is this key always get changed this is my json Object and I want fetch all the log which are present inside the json object and store them in one array like this here user_1 user_2 get changed everytime and I wanted to tackle
create custom nested output from json using javascript
I am trying to save data in json object by using map function but the problem is I can save data by using needed_key:value.arrayData.key needed_value:value.arrayData.value if all the needed_key and needed_value are same I can use above code but here problem is key name is same but the needed_value get change by random and value I only want to save
read all the files and store in one file using node js / javascript
I have 3 Json file in my project/Folder file1.json File2.json File3.json I wrote a code where I can read my project/Folder so I can read all the data which is present inside the json file and want to append in my output.json my expected output is like this as I want to append the data which I got from file1,
Key from one Json file to value of another Json file using node/Javascript
I tried and searched to make a JSON file who’s keys are data in other JSON file for eg: admin in user.json is the key but it will act like value inside the Schema.json file same other keys which are present inside the user.json file will act like value inside Schema.json file. suppose I have user.json name Json file and
FATAL ERROR: v8::Object::SetInternalField() Internal field out of bounds on Node js using node-cache
I have a api export with a lot of data so I tried to used the node-cache so the api will be faster since take more than 2 min to get the data, I am new on this so I found the follow code: Notes: env node js/express Any suggestion or recommend will be great! Answer The solution was using
Compare date and time in array of objects
I’m trying to compare the date and time to manipulate my data. I need to check which is the latest data by checking updated_at key inside object. Below I have given the scenario. I’m trying like this, but how to use moment here to compare which is latest. But I’m not getting the expected result as below. How can I
How to find path from tree of nodes
Consider a data structure similar to the one below: The function I have tried is as follows using recursion. I am getting an output: [{name: ‘Link10’, url: ‘link10’}] I would like to get an output as follows: And if I call the function as follows: Should return results as [{name: ‘Link11’, url: ‘link11’,}] I tried the following as well and
resolve and reject issue using node js
Is this possible way to return resolve or reject message from one function to another? As I am writing to pass resolve message in postman whenever my task is completed or reject message when there is some error But after after writing return it still not returning the resolve message or reject message inside Postman any idea how this can
Cannot Uninstall two npm Packages
I have installed node-gyp in order to install scrypt. While installing the node-gyp package the following two packages were installed along with it: 101@1.6.3 d@1.0.1 I have tried to remove these two packages, realising that I did not need the node-gyp and scrypt packages, but sudo npm uninstall does not remove them. How can I uninstall these packages? Answer If