JavaScript Module to manipulate matrix feeded with JSON Data