now works with JSON object or JSON array
updated README