convert to new json structure for links