Nester
Get and set properties from deeply nested arrays
Install / Use
/learn @kolodny/NesterREADME
nester - A nested object getter/setter
Usage:
var nester = require('nester');
var nestedObj = {a:{b:{c:{d:42}}}}
var res = nester(nestedObj, 'a.b.c.d'); // getting
console.log(res) // 42
nester(nestedObj, 'a.some.other.path[0]', 42); // setting
console.log(nestedObj.a.some.other.path[0]); // 42
Testing:
npm install
npm test
It lets you set and get some complex paths:
nester(obj, 'a.b[3][""]["\\""]["\'"]["\n"]');
obj.a.b[3][""]['"']["'"]['\n'] === 42 // true
Related Skills
node-connect
352.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
