{"action":"created","comment":{"url":"https://api.github.com/repos/SpoonX/json-statham/pulls/comments/60472003","id":60472003,"diff_hunk":"@@ -294,6 +294,38 @@ class Statham {\n       });\n     });\n   }\n+\n+  /**\n+   * Search and return keys and values that match given string.\n+   *\n+   * @param {String} phrase\n+   *\n+   * @returns {{}}\n+   */\n+  search(phrase) {\n+    let tmp  = {};\n+    let data = this.data;\n+\n+    if (this.isModeNested()) {\n+      data = flatten(this.data);\n+    }\n+\n+    Object.getOwnPropertyNames(data).forEach(key => {\n+      if (typeof data[key] === 'string' && data[key].indexOf(phrase) !== -1) {\n+        tmp[key] = data[key];","path":"index.js","position":69,"original_position":69,"commit_id":"fba35bcb3fd690aaa9142d706946b67988fc34df","original_commit_id":"fba35bcb3fd690aaa9142d706946b67988fc34df","user":{"login":"RWOverdijk","id":781745,"avatar_url":"https://avatars.githubusercontent.com/u/781745?v=3","gravatar_id":"","url":"https://api.github.com/users/RWOverdijk","html_url":"https://github.com/RWOverdijk","followers_url":"https://api.github.com/users/RWOverdijk/followers","following_url":"https://api.github.com/users/RWOverdijk/following{/other_user}","gists_url":"https://api.github.com/users/RWOverdijk/gists{/gist_id}","starred_url":"https://api.github.com/users/RWOverdijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RWOverdijk/subscriptions","organizations_url":"https://api.github.com/users/RWOverdijk/orgs","repos_url":"https://api.github.com/users/RWOverdijk/repos","events_url":"https://api.github.com/users/RWOverdijk/events{/privacy}","received_events_url":"https://api.github.com/users/RWOverdijk/received_events","type":"User","site_admin":false},"body":"Push matches as object with key and value.","created_at":"2016-04-20T19:27:10Z","updated_at":"2016-04-20T19:27:10Z","html_url":"https://github.com/SpoonX/json-statham/pull/19#discussion_r60472003","pull_request_url":"https://api.github.com/repos/SpoonX/json-statham/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/SpoonX/json-statham/pulls/comments/60472003"},"html":{"href":"https://github.com/SpoonX/json-statham/pull/19#discussion_r60472003"},"pull_request":{"href":"https://api.github.com/repos/SpoonX/json-statham/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/SpoonX/json-statham/pulls/19","id":67243246,"html_url":"https://github.com/SpoonX/json-statham/pull/19","diff_url":"https://github.com/SpoonX/json-statham/pull/19.diff","patch_url":"https://github.com/SpoonX/json-statham/pull/19.patch","issue_url":"https://api.github.com/repos/SpoonX/json-statham/issues/19","number":19,"state":"open","locked":false,"title":"Feature/search","user":{"login":"Rawphs","id":17144983,"avatar_url":"https://avatars.githubusercontent.com/u/17144983?v=3","gravatar_id":"","url":"https://api.github.com/users/Rawphs","html_url":"https://github.com/Rawphs","followers_url":"https://api.github.com/users/Rawphs/followers","following_url":"https://api.github.com/users/Rawphs/following{/other_user}","gists_url":"https://api.github.com/users/Rawphs/gists{/gist_id}","starred_url":"https://api.github.com/users/Rawphs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rawphs/subscriptions","organizations_url":"https://api.github.com/users/Rawphs/orgs","repos_url":"https://api.github.com/users/Rawphs/repos","events_url":"https://api.github.com/users/Rawphs/events{/privacy}","received_events_url":"https://api.github.com/users/Rawphs/received_events","type":"User","site_admin":false},"body":"Added .search() method.","created_at":"2016-04-20T19:20:29Z","updated_at":"2016-04-20T19:27:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75e5136c07b9b4da1581c7a859c95aad4a419645","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SpoonX/json-statham/pulls/19/commits","review_comments_url":"https://api.github.com/repos/SpoonX/json-statham/pulls/19/comments","review_comment_url":"https://api.github.com/repos/SpoonX/json-statham/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SpoonX/json-statham/issues/19/comments","statuses_url":"https://api.github.com/repos/SpoonX/json-statham/statuses/fba35bcb3fd690aaa9142d706946b67988fc34df","head":{"label":"Rawphs:feature/search","ref":"feature/search","sha":"fba35bcb3fd690aaa9142d706946b67988fc34df","user":{"login":"Rawphs","id":17144983,"avatar_url":"https://avatars.githubusercontent.com/u/17144983?v=3","gravatar_id":"","url":"https://api.github.com/users/Rawphs","html_url":"https://github.com/Rawphs","followers_url":"https://api.github.com/users/Rawphs/followers","following_url":"https://api.github.com/users/Rawphs/following{/other_user}","gists_url":"https://api.github.com/users/Rawphs/gists{/gist_id}","starred_url":"https://api.github.com/users/Rawphs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rawphs/subscriptions","organizations_url":"https://api.github.com/users/Rawphs/orgs","repos_url":"https://api.github.com/users/Rawphs/repos","events_url":"https://api.github.com/users/Rawphs/events{/privacy}","received_events_url":"https://api.github.com/users/Rawphs/received_events","type":"User","site_admin":false},"repo":{"id":56216659,"name":"json-statham","full_name":"Rawphs/json-statham","owner":{"login":"Rawphs","id":17144983,"avatar_url":"https://avatars.githubusercontent.com/u/17144983?v=3","gravatar_id":"","url":"https://api.github.com/users/Rawphs","html_url":"https://github.com/Rawphs","followers_url":"https://api.github.com/users/Rawphs/followers","following_url":"https://api.github.com/users/Rawphs/following{/other_user}","gists_url":"https://api.github.com/users/Rawphs/gists{/gist_id}","starred_url":"https://api.github.com/users/Rawphs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rawphs/subscriptions","organizations_url":"https://api.github.com/users/Rawphs/orgs","repos_url":"https://api.github.com/users/Rawphs/repos","events_url":"https://api.github.com/users/Rawphs/events{/privacy}","received_events_url":"https://api.github.com/users/Rawphs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rawphs/json-statham","description":"Kick your JSON's ass, with json-statham's help.","fork":true,"url":"https://api.github.com/repos/Rawphs/json-statham","forks_url":"https://api.github.com/repos/Rawphs/json-statham/forks","keys_url":"https://api.github.com/repos/Rawphs/json-statham/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rawphs/json-statham/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rawphs/json-statham/teams","hooks_url":"https://api.github.com/repos/Rawphs/json-statham/hooks","issue_events_url":"https://api.github.com/repos/Rawphs/json-statham/issues/events{/number}","events_url":"https://api.github.com/repos/Rawphs/json-statham/events","assignees_url":"https://api.github.com/repos/Rawphs/json-statham/assignees{/user}","branches_url":"https://api.github.com/repos/Rawphs/json-statham/branches{/branch}","tags_url":"https://api.github.com/repos/Rawphs/json-statham/tags","blobs_url":"https://api.github.com/repos/Rawphs/json-statham/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rawphs/json-statham/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rawphs/json-statham/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rawphs/json-statham/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rawphs/json-statham/statuses/{sha}","languages_url":"https://api.github.com/repos/Rawphs/json-statham/languages","stargazers_url":"https://api.github.com/repos/Rawphs/json-statham/stargazers","contributors_url":"https://api.github.com/repos/Rawphs/json-statham/contributors","subscribers_url":"https://api.github.com/repos/Rawphs/json-statham/subscribers","subscription_url":"https://api.github.com/repos/Rawphs/json-statham/subscription","commits_url":"https://api.github.com/repos/Rawphs/json-statham/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rawphs/json-statham/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rawphs/json-statham/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rawphs/json-statham/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rawphs/json-statham/contents/{+path}","compare_url":"https://api.github.com/repos/Rawphs/json-statham/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rawphs/json-statham/merges","archive_url":"https://api.github.com/repos/Rawphs/json-statham/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rawphs/json-statham/downloads","issues_url":"https://api.github.com/repos/Rawphs/json-statham/issues{/number}","pulls_url":"https://api.github.com/repos/Rawphs/json-statham/pulls{/number}","milestones_url":"https://api.github.com/repos/Rawphs/json-statham/milestones{/number}","notifications_url":"https://api.github.com/repos/Rawphs/json-statham/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rawphs/json-statham/labels{/name}","releases_url":"https://api.github.com/repos/Rawphs/json-statham/releases{/id}","deployments_url":"https://api.github.com/repos/Rawphs/json-statham/deployments","created_at":"2016-04-14T07:31:07Z","updated_at":"2016-04-14T07:31:08Z","pushed_at":"2016-04-20T19:19:39Z","git_url":"git://github.com/Rawphs/json-statham.git","ssh_url":"git@github.com:Rawphs/json-statham.git","clone_url":"https://github.com/Rawphs/json-statham.git","svn_url":"https://github.com/Rawphs/json-statham","homepage":null,"size":101,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SpoonX:master","ref":"master","sha":"867bf2c6fcde8b9b853ed2203bd7c8a98a73f5b1","user":{"login":"SpoonX","id":3681611,"avatar_url":"https://avatars.githubusercontent.com/u/3681611?v=3","gravatar_id":"","url":"https://api.github.com/users/SpoonX","html_url":"https://github.com/SpoonX","followers_url":"https://api.github.com/users/SpoonX/followers","following_url":"https://api.github.com/users/SpoonX/following{/other_user}","gists_url":"https://api.github.com/users/SpoonX/gists{/gist_id}","starred_url":"https://api.github.com/users/SpoonX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpoonX/subscriptions","organizations_url":"https://api.github.com/users/SpoonX/orgs","repos_url":"https://api.github.com/users/SpoonX/repos","events_url":"https://api.github.com/users/SpoonX/events{/privacy}","received_events_url":"https://api.github.com/users/SpoonX/received_events","type":"Organization","site_admin":false},"repo":{"id":56181233,"name":"json-statham","full_name":"SpoonX/json-statham","owner":{"login":"SpoonX","id":3681611,"avatar_url":"https://avatars.githubusercontent.com/u/3681611?v=3","gravatar_id":"","url":"https://api.github.com/users/SpoonX","html_url":"https://github.com/SpoonX","followers_url":"https://api.github.com/users/SpoonX/followers","following_url":"https://api.github.com/users/SpoonX/following{/other_user}","gists_url":"https://api.github.com/users/SpoonX/gists{/gist_id}","starred_url":"https://api.github.com/users/SpoonX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpoonX/subscriptions","organizations_url":"https://api.github.com/users/SpoonX/orgs","repos_url":"https://api.github.com/users/SpoonX/repos","events_url":"https://api.github.com/users/SpoonX/events{/privacy}","received_events_url":"https://api.github.com/users/SpoonX/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpoonX/json-statham","description":"Kick your JSON's ass, with json-statham's help.","fork":false,"url":"https://api.github.com/repos/SpoonX/json-statham","forks_url":"https://api.github.com/repos/SpoonX/json-statham/forks","keys_url":"https://api.github.com/repos/SpoonX/json-statham/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpoonX/json-statham/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpoonX/json-statham/teams","hooks_url":"https://api.github.com/repos/SpoonX/json-statham/hooks","issue_events_url":"https://api.github.com/repos/SpoonX/json-statham/issues/events{/number}","events_url":"https://api.github.com/repos/SpoonX/json-statham/events","assignees_url":"https://api.github.com/repos/SpoonX/json-statham/assignees{/user}","branches_url":"https://api.github.com/repos/SpoonX/json-statham/branches{/branch}","tags_url":"https://api.github.com/repos/SpoonX/json-statham/tags","blobs_url":"https://api.github.com/repos/SpoonX/json-statham/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpoonX/json-statham/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpoonX/json-statham/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpoonX/json-statham/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpoonX/json-statham/statuses/{sha}","languages_url":"https://api.github.com/repos/SpoonX/json-statham/languages","stargazers_url":"https://api.github.com/repos/SpoonX/json-statham/stargazers","contributors_url":"https://api.github.com/repos/SpoonX/json-statham/contributors","subscribers_url":"https://api.github.com/repos/SpoonX/json-statham/subscribers","subscription_url":"https://api.github.com/repos/SpoonX/json-statham/subscription","commits_url":"https://api.github.com/repos/SpoonX/json-statham/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpoonX/json-statham/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpoonX/json-statham/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpoonX/json-statham/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpoonX/json-statham/contents/{+path}","compare_url":"https://api.github.com/repos/SpoonX/json-statham/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpoonX/json-statham/merges","archive_url":"https://api.github.com/repos/SpoonX/json-statham/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpoonX/json-statham/downloads","issues_url":"https://api.github.com/repos/SpoonX/json-statham/issues{/number}","pulls_url":"https://api.github.com/repos/SpoonX/json-statham/pulls{/number}","milestones_url":"https://api.github.com/repos/SpoonX/json-statham/milestones{/number}","notifications_url":"https://api.github.com/repos/SpoonX/json-statham/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpoonX/json-statham/labels{/name}","releases_url":"https://api.github.com/repos/SpoonX/json-statham/releases{/id}","deployments_url":"https://api.github.com/repos/SpoonX/json-statham/deployments","created_at":"2016-04-13T19:47:37Z","updated_at":"2016-04-20T08:01:43Z","pushed_at":"2016-04-20T19:20:29Z","git_url":"git://github.com/SpoonX/json-statham.git","ssh_url":"git@github.com:SpoonX/json-statham.git","clone_url":"https://github.com/SpoonX/json-statham.git","svn_url":"https://github.com/SpoonX/json-statham","homepage":null,"size":99,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpoonX/json-statham/pulls/19"},"html":{"href":"https://github.com/SpoonX/json-statham/pull/19"},"issue":{"href":"https://api.github.com/repos/SpoonX/json-statham/issues/19"},"comments":{"href":"https://api.github.com/repos/SpoonX/json-statham/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/SpoonX/json-statham/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/SpoonX/json-statham/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SpoonX/json-statham/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/SpoonX/json-statham/statuses/fba35bcb3fd690aaa9142d706946b67988fc34df"}}}}