Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
NestedHash is a Hash converter. It will created a simple, key encoded hash, in to a nested hash. For example, the hash:
{
"name" => "guillermo",
"properties.age" => 29,
"properties.sex" => "male",
"parents.1" => "ramon",
"parents.2" => "gloria"
}
will be converted into the hash
{
"name" => "guillermo",
"properties" => {
"age" => 29,
"sex" => "male"
},
"parents" => [ "ramon", "gloria" ]
}
require 'nested_hash'
my_normal_hash = {
"name" => "guillermo",
"properties.age" => 29,
"properties.sex" => "male",
"parents.1" => "ramon",
"parents.2" => "gloria"
}
my_new_hash = NestedHash.new(my_normal_hash)
my_new_hash # => {"name"=>"guillermo", "properties"=>{"age"=>29, "sex"=>"male"}, "parents"=>["ramon", "gloria"]}
NestedHash inherits from Hash, so you can use it as a normal hash.
$ gem install nested_hash
The reason for creating this ruby gem is to convert Excel files to json files. With the rubygems roo you already can get the rows into a one level hash (colum title as a key). This complement help to create more difficult structures with the same excel file.
Mit
FAQs
Unknown package
We found that nested_hash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.