doubly linked list from JSON function complete