1

Access an array in Ektorp/TouchDB Map function - Android

view story
linux-howto

http://stackoverflow.com – Can't get my head around how to access an array in Ektorp/TouchDB, my JSON array looks like: "categories": [ "cat1", "cat2"] I want to create a view based on if an object is a certain category. My map function which doesn't work looks like: @Override public void map(Map<String, Object> document, TDViewMapEmitBlock emitter) { if("categories".equals("cat1")) { emitter.emit(null, document.get("_id")); } } }, null, "1.0"); (HowTos)