tonytomov/jqGrid — pull request #669 by OlegKi (2014-12-15 00:16:38+00:00)
Title: bug fixes in addJSONData, normalizeData and addRowData

Hello Tony,

some parts of the code of `addJSONData` and `normalizeData` need be fixed after changing `keyIndex` to `keyName`. The value of `idn` variable used in the code come from `keyName`. So it will be the **name** of the column in case of usage `key: true` property in `colModel`. Other possible values of `idn` could come from `dReader.id` and be also name, dot separated names or dot separated numbers, number, number as string or a function.

The suggested code changes set new `idi` variable to the index of id column and one uses later `idi` instead of `idn` if `repeatitems` is `true` or if the row data `cur` is array, Some additional changes I commented in the code (see [the view](https://github.com/OlegKi/jqGrid/commit/3aad36ef6f1ee42b5a98ad0c12eb557cef675228) for details).

More details about the problem one can see [here](http://www.trirand.com/blog/?page_id=393/bugs/strange-behaviour-after-updating-to-jqgrid-4-7-0).

The changes in `addRowData` are based on [the another bug report](http://www.trirand.com/blog/?page_id=393/bugs/bug-in-addrowdata-method).

Best regards
Oleg