You are accessing the dictionary wrongly. You need to use subscript with string 'id' , Example –
taskViewModel = TaskViewModel(task['id'], True)
You are accessing the dictionary wrongly. You need to use subscript with string 'id' , Example –
taskViewModel = TaskViewModel(task['id'], True)