Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
dear expert
ThingName already exists or not how to find any services , any script share
requirement:
I write JavaScript code ,how to compare already thingName present or not
Solved! Go to Solution.
Hello,
There is a way to see if a thing with a specific name already exists.
Here is some code to achieve this:
result = 'thing doesnt exist';
let thingName = 'YourThingName';
if (Things[thingName]) {
result = 'thing exist';
}
This code will check if there is a thing with the name that you have already exists or not.
Regards,
Jens
Hello,
There is a way to see if a thing with a specific name already exists.
Here is some code to achieve this:
result = 'thing doesnt exist';
let thingName = 'YourThingName';
if (Things[thingName]) {
result = 'thing exist';
}
This code will check if there is a thing with the name that you have already exists or not.
Regards,
Jens