*thanks Paul, really appreciate *
On Tue, Apr 22, 2014 at 4:59 PM, Paul Schreiner <schreiner_p...@att.net>wrote: > I would probably split the array and do something like: > > Sub json_2_Array() > Dim Array1, Array2, sArray > Dim inx1, inx2, i > Dim jSon > jSon = > "[[""A"",""string"",0,""NULL""],[""B"",""string"",0,""NULL""],[""C"",""string"",0,""NULL""],[""D"",""string"",0,""NULL""],[""E"",""string"",0,""isemail""],[""F"",""string"",0,""ismobile""],[""G"",""string"",0,""NULL""],[""H"",""string"",0,""NULL""],[""I"",""string"",0,""isgender""],[""J"",""string"",0,""NULL""],[""K"",""string"",0,""NULL""],[""L"",""string"",0,""NULL""],[""M"",""string"",0,""NULL""],[""N"",""string"",0,""NULL""],[""O"",""string"",0,""NULL""],[""P"",""string"",0,""NULL""],[""Q"",""string"",0,""NULL""],[""R"",""string"",0,""NULL""],[""S"",""string"",0,""NULL""],[""T"",""string"",0,""NULL""],[""U"",""string"",0,""NULL""],[""V"",""string"",0,""NULL""],[""W"",""string"",0,""NULL""],[""X"",""string"",0,""NULL""],[""Y"",""string"",0,""NULL""],[""Z"",""string"",0,""NULL""]]" > Array1 = Split(jSon, "[") > ReDim sArray(UBound(Array1), 3) > For inx1 = 0 To UBound(Array1) > Array2 = Split(Replace(Replace(Array1(inx1), "],", ""), "]", ""), > ",") > For inx2 = 0 To UBound(Array2) > sArray(inx1, inx2) = Replace(Array2(inx2), """", "") > Next inx2 > Next inx1 > Debug.Assert False > End Sub > > *Paul* > ----------------------------------------- > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley* > ----------------------------------------- > > *From:* Rupesh Patil <patil.rupesh1...@gmail.com> > *To:* excel-macros@googlegroups.com > *Sent:* Tuesday, April 22, 2014 2:06 AM > *Subject:* $$Excel-Macros$$ Convert JSON to VBA array > > Hello Experts, > > I need your help, I need to convert Json(output return from webservice) to > Array. > following is json output > > > [["A","string",0,"NULL"],["B","string",0,"NULL"],["C","string",0,"NULL"],["D","string",0,"NULL"],["E","string",0,"isemail"],["F","string",0,"ismobile"],["G","string",0,"NULL"],["H","string",0,"NULL"],["I","string",0,"isgender"],["J","string",0,"NULL"],["K","string",0,"NULL"],["L","string",0,"NULL"],["M","string",0,"NULL"],["N","string",0,"NULL"],["O","string",0,"NULL"],["P","string",0,"NULL"],["Q","string",0,"NULL"],["R","string",0,"NULL"],["S","string",0,"NULL"],["T","string",0,"NULL"],["U","string",0,"NULL"],["V","string",0,"NULL"],["W","string",0,"NULL"],["X","string",0,"NULL"],["Y","string",0,"NULL"],["Z","string",0,"NULL"] > ] > > > > -- > Thanks and Regards, Rp. > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros+unsubscr...@googlegroups.com. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at http://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > > > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros+unsubscr...@googlegroups.com. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at http://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > -- Thanks and Regards, Rp. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.