Put array length outside of the loop
Compare methods for testing string's beggining character.
As long as the JSON string is only evaluated once, the JSON.parse approach is much faster compared to the JavaScript object literal, especially for cold loads.
N/A
JS find vs findIndex
JS find vs indexOf
New benchmark Your benchmarks
Source code: GitHub/MeasureThat.net
Report issues: MeasureThat.net/Issues
Based on: Benchmark.js (v2.1.1)
Facebook page: https://www.facebook.com/MeasureThat.Net