Add fromJson method on collection