
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
dot-finder is using powerful dot notation to get values in JSON object
dot-finder is using powerful dot notation to get values in JSON object
$ npm install dot-finder
const dot = require("dot-finder");
/**
* Object
*/
dot({ foo: { bar: "baz" } }, "foo.bar");
// or
dot({ foo: { bar: "baz" } }, "foo['bar']");
// => "baz"
dot({ "foo.bar": { baz: "hoge" } }, "foo\\.bar.baz");
// => "hoge"
dot({}, "notfound", "defaultValue");
// => "defaultValue"
/**
* Array
*/
dot([[{ fruits: "apple" }, { fruits: "pineapple" }]], "[0][1].fruits");
// or
dot([[{ fruits: "apple" }, { fruits: "pineapple" }]], "0.1.fruits");
// => "pineapple"
/**
* Advanced
*/
const data1 = {
authors: [
{ username: "tsuyoshiwada", profile: { age: 24 } },
{ username: "sampleuser", profile: { age: 30 } },
{ username: "foobarbaz", profile: { age: 33 } }
]
};
dot(data1, "authors.*.username");
// => ["tsuyoshiwada", "sampleuser", "foobarbaz"]
dot(data1, "authors.*.profile.age");
// => [24, 30, 33]
const data2 = [
{
posts: {
tags: [
{ id: 1, slug: "news" },
{ id: 2, slug: "sports" },
{ id: 3, slug: "entertaiment" }
]
}
},
{
posts: {
tags: [
{ id: 4, slug: "music" },
{ id: 5, slug: "it" },
{ id: 6, slug: "programming" }
]
}
}
];
dot(data2, "*.posts.tags.*.slug");
// => ["news", "sports", "entertaiment", "music", "it", "programming"]
FAQs
dot-finder is using powerful dot notation to get values in JSON object
The npm package dot-finder receives a total of 1 weekly downloads. As such, dot-finder popularity was classified as not popular.
We found that dot-finder 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
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.