• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to remove specific object from array

Engaged ,
May 11, 2022 May 11, 2022

Copy link to clipboard

Copied

Hello friends!
How to remove specific object from array

items = ['a', 'b', 'c', 'd'];
items.remove([0]); // "a" remove

 

TOPICS
Actions and scripting , SDK

Views

221

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 11, 2022 May 11, 2022
(items = ['a', 'b', 'c', 'd']).splice(0, 1)

Votes

Translate

Translate
Adobe
LEGEND ,
May 11, 2022 May 11, 2022

Copy link to clipboard

Copied

(items = ['a', 'b', 'c', 'd']).splice(0, 1)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

If it is just about the first item, shift would also work

items = ['a', 'b', 'c', 'd'];
items.shift();

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

I would suggest exaclty same, but 'specific' item implies it has to work for wider scope of elements 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

LATEST

Thanks @c.pfaffenbichler , the first item was just an example.

@Kukurykus  worked really good! Thank you for your support

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines