I use this API that returns a JSON with strings in values that are separated by colons.Example:
{
"id": "test:something:69874354",
"whatever": "maybe"
}
In this example I only need the numeric value of the identifier (69874354), but it could be that the value I'm after is a string (like 'something'). I've never seen this notation in APIs before and I know I could do something like:
var array = Object.id.split(':');
return array[array.length - 1];
...but it feels wrong and I'm thinking there is a standard behind this or a best practice I'm missing?