extract generated JSON string to local variable (used in example)
added example to readme