Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8731097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:09:13+00:00 2026-06-13T09:09:13+00:00

I have two string arrays in javascript like var names = [name1, name2, name3,

  • 0

I have two string arrays in javascript like

var names = [name1, name2, name3, name4];
var values = [value1, value2, value3, value4];

I need to send these values to backend. And I am sending as follows

var nameString = "name1,name2,name3,name4";
var valuesString = "value1,value2,value3,value4";

Then i will iterate it over a map in java. My problem is if i want to remove name from name string, that corresponding value from valueString should also remove. How to do this in java side in an optimized way.

Ex: If i want to remove name3, then new strings should be like following:
  In Java side:   
     String nameString = "name1,name2,name4";
     String valueString = "value1,value2,value4";
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:09:14+00:00Added an answer on June 13, 2026 at 9:09 am

    in javascript:

    var data = {name1:value1, name2:value1, name3:value1, name4:value1};
    

    (quoted if needed), the send the object as JSON, and parse it in java.
    http://www.json.org/java/

    i’m not a java dev, so in cant help you so much with specific code, but the method its the same for all languajes

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have two arrays in my javascript: var content = [string1, string2,
I have two String arrays a,b. String a [] = {one,two,three}; String b []
Let's say I have these two arrays: string[] arr1 = new string[2]{Hello, Stack} string[]
Supposed that I have two arrays: Dim RoomName() As String = {(RoomA), (RoomB), (RoomC),
I have 3 String arrays with constants. eg: String[] digit = {one, two, three};
I have two arrays, @names and @employees , that are filled with strings that
I have two (or more) associative arrays in Javascript: tagArray['title'] = ('<H1>title</H1>'); tagArray['text'] =
I have the following as two ways to declare a two dimensional String array.
I have two array of array of string [[1,'Tambaú','Praça Santo António','Tambaú','12x0',2,'I','EM',12,6,5934,50], [2,'Beira Rio','Av. Bei
I have two different arrays, one with strings and another with ints. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.