title: Get all JSON keys that match a pattern
body: <p>Javascript in a browser environment. I wish to get all keys in a JSON object that match a specific pattern. Say, all of them that begin with <code>mystring</code>. Is there a simpler/efficient way of doing that without having to iterate through all the keys ?</p>
  
  <pre><code>{
     somekey1: "someval1",
     somekey2: "someval2",
     mystringkey1: "someval",
     mystringkey2: "someval"
  
  }
  </code></pre>
  
  <p>There had been similar <a href="https://stackoverflow.com/questions/23998293/loop-through-json-objects-that-only-start-with-a-certain-pattern">questions</a>, but a) doesn't fully answer this question and b) JQuery is not an option at the moment. </p>