This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is snipped inside the angular controller, which got geo positions after loading data from a REST source ... | |
for (var i=0; i<list.length; i++) | |
{ | |
var opts = {"title": list[i].title}; | |
var marker={}; | |
if (list[i].latitude && list[i].longitude ) | |
{ | |
// this is not a google marker, just save pos/title in an object | |
marker = {lat: list[i].latitude, | |
lon: list[i].longitude, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls().forEach (function (f) { if (/\.json/i.test(f)) { db.test.insert (JSON.parse(cat(f))); } }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.test.find('/MyPattern/i.test(JSON.stringify(this))').forEach (function(x) { x.tags='test';db.test.save(x) } ); |