Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parse json in javascript
#2
Hi,
is there really no way to get a Json string into javascript?

This is in V0 inputTag:
Code:
{"Time":"2023-09-09T19:05:35"}

this javascript does't work:

Code:
//var inputValue='{"Time":"2023-09-09T19:05:35";' // this is working
var inputValue = Virtuino.readValue("inputTag");  // does't work

if (inputValue!=null)  {       
  const obj=JSON.parse(inputValue);              
  result = '{"tag":"outputTag", "value":"'+ obj.Time+ '"}';   
}
else  {    
  result = null;
}

 Need something like "Virtuino.readJson"
          
Best regards, Joe
Reply


Messages In This Thread
Parse json in javascript - by Joe - 09-06-2023, 12:43 PM
RE: Parse json in javascript - by Joe - 09-12-2023, 07:37 AM
RE: Parse json in javascript - by iliaslamprou - 09-12-2023, 09:41 PM
RE: Parse json in javascript - by Joe - 09-13-2023, 07:04 AM

Forum Jump:


Users browsing this thread: 5 Guest(s)