lib/nazrin/data_accessor/struct.rb in nazrin-2.6.0 vs lib/nazrin/data_accessor/struct.rb in nazrin-2.6.1

- old
+ new

@@ -58,10 +58,12 @@ end end def data_from_response(res) res.data[:hits][:hit].map do |hit| - self.class.transform_attributes(hit[:fields]) + self.class.transform_attributes( + { 'id' => hit[:id] }.merge(hit[:fields] || {}) + ) end end end end end