{"id":16890271,"url":"https://github.com/marak/jslinq","last_synced_at":"2025-03-17T06:31:46.835Z","repository":{"id":894452,"uuid":"646860","full_name":"Marak/JSLINQ","owner":"Marak","description":"Clean and simple port of Microsoft's LINQ to node.js (and the browser)","archived":false,"fork":false,"pushed_at":"2011-05-19T01:58:50.000Z","size":158,"stargazers_count":92,"open_issues_count":4,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-29T11:13:30.539Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://maraksquires.com/JSLINQ/","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/Marak.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":"2010-05-04T16:14:11.000Z","updated_at":"2024-03-31T07:06:46.000Z","dependencies_parsed_at":"2022-08-16T11:20:42.110Z","dependency_job_id":null,"html_url":"https://github.com/Marak/JSLINQ","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/Marak%2FJSLINQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marak%2FJSLINQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marak%2FJSLINQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marak%2FJSLINQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marak","download_url":"https://codeload.github.com/Marak/JSLINQ/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243847062,"owners_count":20357317,"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":"2024-10-13T17:01:46.182Z","updated_at":"2025-03-17T06:31:46.426Z","avatar_url":"https://github.com/Marak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# this project is mostly un-maintained. i worked on this as an experiment to learn LINQ a bit better and get to write some node code. i might pick it back up later, but there are more active / better versions if you google around a bit.\n\n#JSLINQ - Perform LINQ against JSON\n##A pure JS implementation of Microsoft's [Language Integrated Query](http://en.wikipedia.org/wiki/Language_Integrated_Query) library\n### works in the browser or in node.js (CommonJS)\n\u003cem\u003e(note: just because microsoft is evil, doesn't mean that this one little JS library doesn't kick ass)\u003c/em\u003e\n\n##basic examples\n\nassume the following JSON data:\n\n    var sampleData = [\n        {\n            \"ID\": 1,\n            \"FirstName\": \"Chris\",\n            \"LastName\": \"Pearson\",\n            \"BookIDs\": [\n                1001,\n                1002,\n                1003\n            ]\n        },\n        {\n            \"ID\": 2,\n            \"FirstName\": \"Kate\",\n            \"LastName\": \"Johnson\",\n            \"BookIDs\": [\n                2001,\n                2002,\n                2003\n            ]\n        },\n        {\n            \"ID\": 3,\n            \"FirstName\": \"Josh\",\n            \"LastName\": \"Sutherland\",\n            \"BookIDs\": [\n                3001,\n                3002,\n                3003\n            ]\n        },\n        {\n            \"ID\": 4,\n            \"FirstName\": \"John\",\n            \"LastName\": \"Ronald\",\n            \"BookIDs\": [\n                4001,\n                4002,\n                4003\n            ]\n        },\n        {\n            \"ID\": 5,\n            \"FirstName\": \"Steve\",\n            \"LastName\": \"Pinkerton\",\n            \"BookIDs\": [\n                1001,\n                1002,\n                1003\n            ]\n        },\n        {\n            \"ID\": 6,\n            \"FirstName\": \"Katie\",\n            \"LastName\": \"Zimmerman\",\n            \"BookIDs\": [\n                2001,\n                2002,\n                2003\n            ]\n        },\n        {\n            \"ID\": 7,\n            \"FirstName\": \"Dirk\",\n            \"LastName\": \"Anderson\",\n            \"BookIDs\": [\n                3001,\n                3002,\n                3003\n            ]\n        },\n        {\n            \"ID\": 8,\n            \"FirstName\": \"Chris\",\n            \"LastName\": \"Stevenson\",\n            \"BookIDs\": [\n                4001,\n                4002,\n                4003\n            ]\n        },\n        {\n            \"ID\": 9,\n            \"FirstName\": \"Bernard\",\n            \"LastName\": \"Sutherland\",\n            \"BookIDs\": [\n                1001,\n                2002,\n                3003\n            ]\n        },\n        {\n            \"ID\": 10,\n            \"FirstName\": \"Kate\",\n            \"LastName\": \"Pinkerton\",\n            \"BookIDs\": [\n                4001,\n                3002,\n                2003\n            ]\n        }\n    ];\n\nnow that we have some JSON data to work with, we can perform LINQ statements on it.\n\n###simple Select\n\n    var sample = JSLINQ(sampleData).\n      Select(function (item) {return item.FirstName;});\n\n    output: {\"items\":[\"Chris\",\"Kate\",\"Josh\",\"John\",\"Steve\",\"Katie\",\"Dirk\",\"Chris\",\"Bernard\",\"Kate\"]}\n\n###simple Select with OrderBy\n\n     var sample = JSLINQ(sampleData).\n      Select(function (item) {return item.FirstName;}).\n      OrderBy(function (item) {return item;});\n\n     output: {\"items\":[\"Bernard\",\"Chris\",\"Chris\",\"Dirk\",\"John\",\"Josh\",\"Kate\",\"Kate\",\"Katie\",\"Steve\"]}\n\n###simple Where \n\tvar sample = JSLINQ(sampleData).Where(function (item) {return item.FirstName == \"Chris\";});\n\n\toutput: [\n             {\"ID\":1,\"FirstName\":\"Chris\",\"LastName\":\"Pearson\",\"BookIDs\":[1001,1002,1003]},\n             {\"ID\":8,\"FirstName\":\"Chris\",\"LastName\":\"Stevenson\",\"BookIDs\":[4001,4002,4003]}\n            ]\n\n###For the Full JSLINQ Demo and API implementation goto @ [http://maraksquires.com/JSLINQ/](http://maraksquires.com/JSLINQ/)\n##Original Project Home : [Codeplex Sucks](http://jslinq.codeplex.com/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarak%2Fjslinq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarak%2Fjslinq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarak%2Fjslinq/lists"}