- From: Maciej Pasternacki <
>
- To:
- Subject: [chef] chef-helpers: deep attribute access by JSONPath
- Date: Mon, 22 Jul 2013 12:07:00 +0200
Hi,
One feature that may be particularly useful (and if it's interesting, it may be worth extracting to a separate gem) is overloading Chef::Node#[] to allow reading nested attributes using JSONPath notation (
http://goessner.net/articles/JsonPath/):
chef > require 'chef-helpers'
=> true
chef > node['$..name']
=> ["portinari-2.local", "Java(TM) SE Runtime Environment", "Java HotSpot(TM) 64-Bit Server VM", "Darwin"]
=> ["Darwin"]
-- M
- [chef] chef-helpers: deep attribute access by JSONPath, Maciej Pasternacki, 07/22/2013
Archive powered by MHonArc 2.6.16.