Saturday, 13 May 2017

Parse String in Restify

For the following JSON file

{
"_id":"1",
"Time":"03:20:22"
}

I want to add hours such that "Time" + 2 = "05:20:22";

Using Restify, I do not know how to parse this JSON into caculatable format because if I do data.Time.split(":"); restify does not recognize this command.

How should I parse Strings like "03:20:11" so that I can add number of hours to it?



via Matt Choi

No comments:

Post a Comment