{"id":49454408,"url":"https://github.com/starlog/jsonpathmapper","last_synced_at":"2026-04-30T04:05:54.369Z","repository":{"id":44859342,"uuid":"283354141","full_name":"starlog/jsonpathmapper","owner":"starlog","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-18T23:03:51.000Z","size":25,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-12-09T18:40:13.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/starlog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-28T23:59:47.000Z","updated_at":"2022-07-27T08:29:31.000Z","dependencies_parsed_at":"2023-02-16T03:15:57.464Z","dependency_job_id":null,"html_url":"https://github.com/starlog/jsonpathmapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/starlog/jsonpathmapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starlog%2Fjsonpathmapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starlog%2Fjsonpathmapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starlog%2Fjsonpathmapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starlog%2Fjsonpathmapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/starlog","download_url":"https://codeload.github.com/starlog/jsonpathmapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starlog%2Fjsonpathmapper/sbom","scorecard":{"id":846433,"data":{"date":"2025-08-11","repo":{"name":"github.com/starlog/jsonpathmapper","commit":"d44231d539def070752748a2ae4335b7fc8380d1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-pppg-cpfq-h7wr","Warn: Project is vulnerable to: GHSA-hw8r-x6gr-5gjp","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T21:34:09.127Z","repository_id":44859342,"created_at":"2025-08-23T21:34:09.127Z","updated_at":"2025-08-23T21:34:09.127Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32454196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-04-30T04:05:50.763Z","updated_at":"2026-04-30T04:05:54.363Z","avatar_url":"https://github.com/starlog.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\"# jsonpathmapper\" \n\nSmall utility for mapping javascript object data into jsonpath-description based structure.\n\nUsage: const myResult2 = jsonpathmap2.jsonpathmap2(extract, data);\n\n\nExample:\n\nLet's say this is data.\n~~~\nconst _mydata = {\n    type: 'fruit',\n    list: [\n        {\n            name: 'apple',\n            taste: 'best'\n        },\n        {\n            name: 'banana',\n            taste: 'wow'\n        },\n        {\n            name: 'mango',\n            taste: 'delicious'\n        }\n    ]\n}\n~~~\n\nAnd this is target structure\n~~~\nconst _myTargetStructure = {\n    type: '$.type',\n    count: '%.list[0,1]',\n    list: [\n        {\n            name: '$.list[0,1].name'\n        }\n    ],\n    fullcount: '#.list[*]',\n    fulllist: [\n        {\n            name: '$.list[*].name',\n            taste: '$.list[*].taste',\n        }\n    ]\n}\n~~~\n\njsonpathmap will produce following result\n\n~~~\n{\n  \"type\": \"fruit\",\n  \"count\": 2,\n  \"list\": [\n    {\n      \"name\": \"apple\"\n    },\n    {\n      \"name\": \"banana\"\n    }\n  ],\n    {\n      \"name\": [\n        \"apple\",\n        \"banana\"\n      ]\n    }\n  ],\n  \"fullcount\": \"3\",\n  \"fulllist\": [\n    {\n      \"name\": \"apple\",\n      \"taste\": \"best\"\n    },\n    {\n      \"name\": \"banana\",\n      \"taste\": \"wow\"\n    },\n    {\n      \"name\": \"mango\",\n      \"taste\": \"delicous\"\n    }\n  ]\n}\n~~~\n\ncan use full JSONPath expressions: see https://www.npmjs.com/package/jsonpath\n\n```\n$. denotes jsonpath notation\n#. denotes jsonpath notation's count in string\n%. denotes jsonpath notation's count in number\n```\n\nNEW\nSpecial notation of [!]\n\nLet's say this is data.\n~~~\nconst data = {\n  type: 'fruit',\n  list: [\n    {\n      name: 'apple',\n      rating: 10,\n      metadata: {\n        color: 'red',\n        size: 'middle',\n        records: [\n          {\n            year: 2020,\n            rating: 10\n          },\n          {\n            year: 2021,\n            rating: 8\n          },\n          {\n            year: 2022,\n            rating: 6\n          },\n        ]\n      }\n    },\n    {\n      name: 'mango',\n      rating: 6,\n      metadata: {\n        color: 'yellow',\n        size: 'big',\n        records: [\n          {\n            year: 2020,\n            rating: 7\n          },\n          {\n            year: 2021,\n            rating: 5\n          },\n          {\n            year: 2022,\n            rating: 3\n          },\n        ]\n      }\n    },\n    {\n      name: 'grape',\n      rating: 8,\n      metadata: {\n        color: 'violet',\n        size: 'small',\n        records: [\n          {\n            year: 2020,\n            rating: 4\n          },\n          {\n            year: 2021,\n            rating: 4\n          },\n          {\n            year: 2022,\n            rating: 2\n          },\n        ]\n      }\n    }\n  ]\n}\n~~~\nand query is as follows;\n~~~\nconst extract = {\n  count: '%.list[*].name',\n  stringCount: '#.list[*].name',\n  fruits: [\n    {\n      name: '$.list[*].name',\n      rating: '$.list[*].rating',\n      recordsFor2022: '$.list[*].metadata.records[?(@.year === 2022)].rating',\n      test: [\n        {\n          item1: '$.list[!].metadata.records[*].rating',\n          item2: '$.list[!].metadata.records[*].year',\n        }\n      ]\n    }\n  ]\n}\n~~~\nresult will be ([!] iterate within node only)\n~~~\n{\n  \"count\": 3,\n  \"stringCount\": \"3\",\n  \"fruits\": [\n    {\n      \"name\": \"apple\",\n      \"rating\": 10,\n      \"recordsFor2022\": 6,\n      \"test\": [\n        {\n          \"item1\": 10,\n          \"item2\": 2020\n        },\n        {\n          \"item1\": 8,\n          \"item2\": 2021\n        },\n        {\n          \"item1\": 6,\n          \"item2\": 2022\n        }\n      ]\n    },\n    {\n      \"name\": \"mango\",\n      \"rating\": 6,\n      \"recordsFor2022\": 3,\n      \"test\": [\n        {\n          \"item1\": 7,\n          \"item2\": 2020\n        },\n        {\n          \"item1\": 5,\n          \"item2\": 2021\n        },\n        {\n          \"item1\": 3,\n          \"item2\": 2022\n        }\n      ]\n    },\n    {\n      \"name\": \"grape\",\n      \"rating\": 8,\n      \"recordsFor2022\": 2,\n      \"test\": [\n        {\n          \"item1\": 4,\n          \"item2\": 2020\n        },\n        {\n          \"item1\": 4,\n          \"item2\": 2021\n        },\n        {\n          \"item1\": 2,\n          \"item2\": 2022\n        }\n      ]\n    }\n  ]\n}\n~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarlog%2Fjsonpathmapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarlog%2Fjsonpathmapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarlog%2Fjsonpathmapper/lists"}