read elements from JSON