I have a json, i want to get maximum count of characters from any value under a specific tag without each or for loop, is it possible?
No, you can't avoid looping. You can avoid actually writing a
for loop by (say) using
Array#forEach, but something, somewhere, is going to have to loop.
When I asked why you wanted to avoid looping, you said
because this method will call number of times, so i am trying skipping looping
and when I asked if those repeated calls would be for the same data, you said
yes data will be same it comes from json once
So if it's important to avoid repeating the loops (it probably isn't, but it could be), you'd just loop the first time and then remember the result so you could reuse it in subsequent calls. That's straightforward to write.