{"id":19460401,"url":"https://github.com/bjarneo/object-column","last_synced_at":"2025-07-13T17:08:21.569Z","repository":{"id":57312550,"uuid":"80661868","full_name":"bjarneo/object-column","owner":"bjarneo","description":"Return a single column from an array of objects","archived":false,"fork":false,"pushed_at":"2017-02-08T06:59:20.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-05T07:51:35.825Z","etag":null,"topics":["array","column","object"],"latest_commit_sha":null,"homepage":null,"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/bjarneo.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":"2017-02-01T20:38:57.000Z","updated_at":"2017-02-07T11:42:24.000Z","dependencies_parsed_at":"2022-09-06T21:21:13.820Z","dependency_job_id":null,"html_url":"https://github.com/bjarneo/object-column","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bjarneo/object-column","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2Fobject-column","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2Fobject-column/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2Fobject-column/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2Fobject-column/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjarneo","download_url":"https://codeload.github.com/bjarneo/object-column/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2Fobject-column/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265175560,"owners_count":23722659,"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":["array","column","object"],"created_at":"2024-11-10T17:36:53.666Z","updated_at":"2025-07-13T17:08:21.387Z","avatar_url":"https://github.com/bjarneo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"object-column\n--\n![Travis](https://travis-ci.org/bjarneo/object-column.svg?branch=master)\n\nReturn the values from a single column from the array of objects\n\nInstall\n--\n\n```js\n$ npm i --save object-column\n```\n\nUsage\n--\n\n```js\nconst objectColumn = require('object-column');\n\nobjectColumn(\n    array, // Your array with objects \n    column, // The column you want to fetch \n    key // Optional. Key for your returned object\n);\n\n```\n\n```js\nconst data = [{\n    id: 1,\n    name: 'Nanon',\n    repository: 'https://github.com/bjarneo/nanon'\n}, {\n    id: 2,\n    name: 'Instantly',\n    repository: 'https://github.com/bjarneo/instantly'\n}, {\n    id: 3,\n    name: 'Roc',\n    repository: 'https://github.com/rocjs/roc'\n}, {\n    id: 4,\n    name: 'Object Column',\n    repository: 'https://github.com/bjarneo/object-column'\n}];\n\nconst names = objectColumn(data, 'name');\n// [ 'Nanon', 'Instantly', 'Roc', 'Object Column' ] \n\nconst nameRepo = objectColumn(data, 'repository', 'name');\n/*\n[{\n    Nanon: 'https://github.com/bjarneo/nanon'\n}, {\n    Instantly: 'https://github.com/bjarneo/instantly'\n}, {\n    Roc: 'https://github.com/rocjs/roc'\n}, {\n    'Object Column': 'https://github.com/bjarneo/object-column'\n}]\n*/\n\n```\n\nContribution\n--\nContributions are appreciated.\n\nLicense\n--\nMIT-licensed. See LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjarneo%2Fobject-column","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjarneo%2Fobject-column","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjarneo%2Fobject-column/lists"}