{"id":25979271,"url":"https://github.com/bjorg/jdoc","last_synced_at":"2025-03-05T06:29:14.194Z","repository":{"id":1251776,"uuid":"1190374","full_name":"bjorg/jDoc","owner":"bjorg","description":"Turn JSON objects into queryable documents","archived":false,"fork":false,"pushed_at":"2011-06-21T15:53:36.000Z","size":3684,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T07:09:23.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bjorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-12-22T15:13:04.000Z","updated_at":"2021-08-25T05:32:40.000Z","dependencies_parsed_at":"2022-08-16T12:45:18.788Z","dependency_job_id":null,"html_url":"https://github.com/bjorg/jDoc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjorg%2FjDoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjorg%2FjDoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjorg%2FjDoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjorg%2FjDoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjorg","download_url":"https://codeload.github.com/bjorg/jDoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241978511,"owners_count":20051990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-05T06:29:13.606Z","updated_at":"2025-03-05T06:29:14.180Z","avatar_url":"https://github.com/bjorg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"jDoc (v0.2)\n===========\n*Turn JSON objects into queryable documents*\n\njDoc is a lightweight Javascript class which provides querying capabilities over JSON objects.\n\nFeatures\n--------\n* recursive pattern matching\n* selection filtering\n* selection iterating\n* document navigation\n\nUsing jDoc\n-----------\njDoc uses a fluid interface to query for nested objects in a JSON document.  Selections can\nbe refined by filtering and then iterated over.\n\nExample 1: Getting the text value of the first selected node\n------------------------------------------------------------\n\tvar jdoc = new jDoc(json);\n\t\n\t// obtain the text of the first title node inside a book node\n\tvar result = jdoc.select('book/title').text();\n\t\n\t// or you can use the shorthand form\n\tvar result = jdoc.text('book/title');\n\nExample 2: Finding the text value of all selected nodes\n-------------------------------------------------------\n\tvar jdoc = new jDoc(json);\n\t\n\t// obtain the text of all title nodes inside of all book nodes\n\tvar result = '';\n\tjdoc.select('book/title').each(function(cur) {\n\t\tresult += 'title: '  + cur.text() + '\\n';\n\t});\n\nSelection Methods\n-----------------\n* jdoc.select(selector)\n* jdoc.match(string | regexp | function, [recursive])\n* jdoc.attributes()\n* jdoc.elements()\n\nItem Methods\n------------\n* jdoc.exists([selector])\n* jdoc.value([selector])\n* jdoc.text([selector])\n\nCollection Methods\n------------------\n* jdoc.any()\n* jdoc.first()\n* jdoc.next()\n* jdoc.each(function(jdoc) [, context])\n* jdoc.get(index)\n* jdoc.count()\n* jdoc.where(function(jdoc) [, context])\n* jdoc.union(jdoc)\n* jdoc.map(function(jdoc) [, context])\n\nCompatibility\n-------------\n* Firefox\n* IE\n* Chrome\n\nUpdate Log\n----------\n* 0.1 - Initial release\n* 0.2 - Additionanl overloads which take selector; removed jQuery dependency; improved method names:\n        'map()' instead of 'select()', 'exists()' instead of 'hasValue()', 'value()' instead of 'json()', and 'select()' instead of '$()' \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjorg%2Fjdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjorg%2Fjdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjorg%2Fjdoc/lists"}