{"id":20319571,"url":"https://github.com/nfourtythree/craft-json-data","last_synced_at":"2025-04-11T18:20:46.402Z","repository":{"id":17173976,"uuid":"19941225","full_name":"nfourtythree/craft-json-data","owner":"nfourtythree","description":"Adds jsonData filter to templates allowing the pipe in of entry data and return of json encoded data","archived":false,"fork":false,"pushed_at":"2016-02-22T17:02:01.000Z","size":10,"stargazers_count":20,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T14:12:15.107Z","etag":null,"topics":["craft-plugin","craftcms","craftcms-plugin","json"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/nfourtythree.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":"2014-05-19T12:39:25.000Z","updated_at":"2023-03-20T13:46:36.000Z","dependencies_parsed_at":"2022-07-13T13:51:49.501Z","dependency_job_id":null,"html_url":"https://github.com/nfourtythree/craft-json-data","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfourtythree%2Fcraft-json-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfourtythree%2Fcraft-json-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfourtythree%2Fcraft-json-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfourtythree%2Fcraft-json-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfourtythree","download_url":"https://codeload.github.com/nfourtythree/craft-json-data/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248456384,"owners_count":21106606,"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":["craft-plugin","craftcms","craftcms-plugin","json"],"created_at":"2024-11-14T18:47:22.575Z","updated_at":"2025-04-11T18:20:46.370Z","avatar_url":"https://github.com/nfourtythree.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON Data plugin for craftcms\n\nAdds `jsonData` filter to templates allowing the pipe in of entry data and return of json encoded data.\n\nIt accepts field names as parameters (comma separated) and works with related fields.\n\nVery early release.\n\n```\n// Template Tag\n{{ entries | jsonData(\n                \"id\",\n                \"title\",\n                \"category.title\",\n                \"myRelatedField.title\",\n                \"myRelatedField.customField\",\n                \"myRelatedField.itsRelatedField.title\") | raw }}\n\n// Passing an array of entries returns\n{\n    {\n        \"id\": 1,\n        \"title\": \"Entry Title\",\n        \"category\": [\n            {\n                \"title\": \"Category Title\"\n            }\n        ],\n        \"myRelatedField\": [\n            {\n                \"title\": \"Related Entry's Title\",\n                \"customField\": \"Custom Data\",\n                \"itsRelatedField\": [\n                    {\n                        \"title\": \"Related Related Title\"\n                    }\n                ],\n            }\n        ]\n    },\n    {\n        \"id\": 2,\n        \"title\": \"Entry Title 2\",\n        \"category\": [\n            {\n                \"title\": \"Category Title 2\"\n            }\n        ],\n        \"myRelatedField\": [\n            {\n                \"title\": \"Related Entry's Title 2\",\n                \"customField\": \"Custom Data 2\",\n                \"itsRelatedField\": [\n                    {\n                        \"title\": \"Related Related Title 2\"\n                    }\n                ],\n            }\n        ]\n    },\n}\n\n// Passing a single entry returns\n{\n    \"id\": 1,\n    \"title\": \"Entry Title\",\n    \"category\": [\n        {\n            \"title\": \"Category Title\"\n        }\n    ],\n    \"myRelatedField\": [\n        {\n            \"title\": \"Related Entry's Title\",\n            \"customField\": \"Custom Data\",\n            \"itsRelatedField\": [\n                {\n                    \"title\": \"Related Related Title\"\n                }\n            ],\n        }\n    ]\n}\n```\n\nAdded the ability to return Asset transforms by using getUrl() with the handle and returns it in the array\n\n```\n// Template Tag\n{{ entries | jsonData(\n                \"id\",\n                \"image.getUrl('myTransformHandle')\") | raw }}\n\n\n\n// Returns\n{\n    {\n        \"id\": 1,\n        \"image\":  [\n            {\n                \"myTransformHandle\": \"http://example.craft.dev/upload/path/_myTransformHandle/image.jpg\"\n            }\n        ]\n    }\n}\n```\n\n## JSON Data Changelog\n\n### 0.1.2 -- 2014.05.19\n\n* Added parsing for returning raw content of Rich Text Fields\n\n### 0.1.1 -- 2015.08.01\n\n* Allowed return of single entry\n\n### 0.1.0 -- 2014.05.19\n\n* Initial release\n\nBrought to you by [nfourtythree](http://n43.me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfourtythree%2Fcraft-json-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfourtythree%2Fcraft-json-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfourtythree%2Fcraft-json-data/lists"}