response {
...
category{
$nCat : "something",
$sCat : "some other things"
}
...
}
for each video in allVideos
gridposter.category = video.category.$nCat
...
end for
Function strReplace(basestr As String,oldsub As String,newsub As String) As String
newstr=""
i=1
While i<=Len(basestr)
x=Instr(i,basestr,oldsub)
If x=0
newstr=newstr+MID(basestr,i)
Exit While
End If
If x>i
newstr=newstr+MID(basestr,i,x-i)
i=x
End If
newstr=newstr+newsub
i=i+Len(oldsub)
End While
Return newstr
End Function
gridposter.category = video.category["$nCat"]
video.category.Lookup("$nCat")