On Monday, September 30, 2013 at 11:05 AM, Cassiano Leal wrote:
Yep. So the catch here is that the search will always return an Array of all the items that matched the search criteria.If the only item matching is your one data bag, it will return[{“id”: “uas-replicaset-1”,…}]In which case calling .first() on it will have the desired result as it will return only the first (and in this case, the only one) item of the Array.Problems might arise if your search returns more than one item, in which case you’d be discarding all but the first.
Archive powered by MHonArc 2.6.16.