I am using Json to achieve the requirements, kindly advise on how to iterate throug json
DECLARE @json NVARCHAR(MAX) = N'[{ "ID":"1", "Product":"A", "CreditLimit":"12357.00", "AccountHolder:"29150820", "ProductNumber":"00098683"},
{ "ID":"2", "Product":"B", "CreditLimit":"3434.00", "AccountHolder":"73247202", "ProductNumber":"00098706"},
{ "ID":"3", "Product":"C", "CreditLimit":"1000.00", "AccountHolder":"73212071", "ProductNumber":"00098684"},
{ "ID":"4", "Product":"D", "CreditLimit":"34000.00", "AccountHolder":"73247205", "ProductNumber":"343434444"}]';
declare @prdcount int
SELECT @prdcount = COUNT(*) FROM OPENJSON(@json)
DECLARE @MAXID INT, @Counter INT,@OpportunityPrdNumber varchar(12), @CreditLimit decimal(18, 2),@Prdcode varchar(4),
@AccHolder varchar(15)
DECLARE @RowCount INT = @prdcount;
WHILE @RowCount > 0
BEGIN
SELECT JSON_QUERY(@json,'$.ID');
SET @RowCount-=1
END