{"id":13653959,"url":"https://github.com/bash-bastion/bash-object","last_synced_at":"2025-08-13T08:32:26.966Z","repository":{"id":40342805,"uuid":"394604186","full_name":"bash-bastion/bash-object","owner":"bash-bastion","description":"Manipulate heterogenous data hierarchies in Bash.","archived":false,"fork":false,"pushed_at":"2023-10-20T14:20:50.000Z","size":3110,"stargazers_count":29,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T10:40:38.779Z","etag":null,"topics":["basalt","bash","shell"],"latest_commit_sha":null,"homepage":"https://bash-bastion.github.io/bash-object/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bash-bastion.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-10T09:58:37.000Z","updated_at":"2024-12-27T07:52:16.000Z","dependencies_parsed_at":"2023-01-19T19:18:20.385Z","dependency_job_id":"be0a5df5-99a7-416b-97c1-19073c67e8a9","html_url":"https://github.com/bash-bastion/bash-object","commit_stats":null,"previous_names":["bash-bastion/bash-object","hyperupcall/bash-object"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/bash-bastion/bash-object","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bash-bastion%2Fbash-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bash-bastion%2Fbash-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bash-bastion%2Fbash-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bash-bastion%2Fbash-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bash-bastion","download_url":"https://codeload.github.com/bash-bastion/bash-object/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bash-bastion%2Fbash-object/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270210223,"owners_count":24545830,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"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":["basalt","bash","shell"],"created_at":"2024-08-02T02:01:21.245Z","updated_at":"2025-08-13T08:32:26.959Z","avatar_url":"https://github.com/bash-bastion.png","language":"Shell","funding_links":[],"categories":["General use"],"sub_categories":["Libraries"],"readme":"# bash-object\n\nManipulate heterogenous data hierarchies in Bash.\n\nThis is meant to be a low level API providing primitives for other libraries.\n\n## Exhibition\n\n```sh\n# Problem: How to represent the following in Bash?\n\n# {\n#   \"zulu\": {\n#     \"yankee\": {\n#       \"xray\": {\n#         \"whiskey\": \"victor\",\n#         \"foxtrot\": [\"omicron\", \"pi\", \"rho\", \"sigma\"]\n#       }\n#     }\n#   }\n# }\n\n\n# Solution: Use bash-object to construct the hierarchy\n\ndeclare -A root_object=()\ndeclare -A zulu_object=()\ndeclare -A yankee_object=()\ndeclare -A xray_object=([whiskey]=victor)\ndeclare -a foxtrot_array=(omicron pi rho sigma)\n\nbobject set-object --ref root_object '.zulu' zulu_object\nbobject set-object --ref root_object '.zulu.yankee' yankee_object\nbobject set-object --ref root_object '.zulu.yankee.xray' xray_object\nbobject set-array --ref root_object '.zulu.yankee.xray.foxtrot' foxtrot_array\n\nbobject get-object --value root_object '.zulu.yankee.xray'\nassert [ \"${REPLY[whiskey]}\" = victor ]\n\nbobject get-string --value root_object '.zulu.yankee.xray.whiskey'\nassert [ \"$REPLY\" = victor ]\n\nbobject get-array --value root_object '.zulu.yankee.xray.foxtrot'\nassert [ ${#REPLY[@]} -eq 4 ]\n\nbobject get-string --value root_object '.[\"zulu\"].[\"yankee\"].[\"xray\"].[\"foxtrot\"].[2]'\nassert [ \"$REPLY\" = rho ]\n\nbobject.print 'root_object'\n# |__ zulu (__bash_object_root_object___zulu_24092_8313_29963_14301_14535)\n#    |__ yankee (__bash_object_root_object___zulu_yankee_15383_14163_12814_23488_13779)\n#       |__ xray (__bash_object_root_object___zulu_yankee_xray_18071_28791_7790_539_19231)\n#          |__ whiskey\n#          |__ foxtrot (__bash_object_root_object___zulu_yankee_xray_foxtrot_26606_15833_10655_7208_16587)\n#             |- omicron\n#             |- pi\n#             |- rho\n#             |- sigma\n```\n\n## Installation\n\nUse [Basalt](https://github.com/bash-bastion/basalt), a Bash package manager, to add this project as a dependency\n\n```sh\nbasalt add bash-bastion/bash-object\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbash-bastion%2Fbash-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbash-bastion%2Fbash-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbash-bastion%2Fbash-object/lists"}