1

A meteor app has a json data which need to be displayed for users to select from. The user need to drill down 3 levels deep in order to select the item of their choice and may make multiple selections.

There is an online json viewer which allows one to drill down to select as well as search for a given string and the whole json data will be filtered revealing the json entry which contains the searched-for string as it is being type.

What is the general approach to have this kind of functionality in a meteor mobile app? Thanks

Fred J.
  • 5,759
  • 10
  • 57
  • 106
  • Once you have the JavaScript object you can use it however you please. In your example above it seems you want to display that in a treeview and also search for a string. http://stackoverflow.com/questions/8517089/js-search-in-object-values http://stackoverflow.com/questions/12462318/find-a-value-in-an-array-of-objects-in-javascript Treeview of a JavaScript: https://www.syncfusion.com/kb/4733/how-to-use-raw-javascript-object-to-build-a-treeview https://github.com/jsoverson/ui-treeview – mariocatch Jun 17 '16 at 20:34

1 Answers1

0

You can find a package on npm or atmosphere (Meteor specific packages) that fits your needs.

The community is moving towards npm in general but for some very integrated solutions (with the Meteor ecosystem) atmosphere is still the place to look.

Like this example for instance is really just a wrapper for the npm json-editor package.

Check out http://guide.meteor.com/atmosphere-vs-npm.html for more explanation.

Basically

import { JSONEditor } from 'meteor/appworkshop:json';

In this case will import required code. (Note 'meteor/ ) due to atmosphere packages being stored in meteor directory.

SlartyBartfast
  • 311
  • 1
  • 3
  • 12